Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@victori444
Copy link
Contributor

Brief summary of changes

In the Media module, allows files with names containing commas to be downloaded (would previously result in an error)

Testing instructions (if applicable)

  1. Upload a file containing a comma in its name to the Media module
  2. Check that the file can be downloaded

Link(s) to related issue(s)

The same fix was made here for the document repository

@skarya22
Copy link
Contributor

skarya22 commented Jan 7, 2025

I think I do not have a working media module on my vm as even outside of this PR I get this error when trying to upload
PHP Warning: move_uploaded_file(): Unable to move "/tmp/php8l06uC" to "/data/uploads/DCC090_V1_bmi_calculator.png" in /var/www/loris/modules/media/ajax/FileUpload.php on line 186,

and downloads don't work either

@skarya22 skarya22 added the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Jan 7, 2025
@racostas racostas self-assigned this Jan 9, 2025
@racostas racostas self-requested a review January 9, 2025 20:25
Copy link
Contributor

@racostas racostas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helping testing since @skarya22 have some issues with the VM.

This are my findings:

  1. Not sure if we will have this case - in the practice - since the media module is not as free in the name we can choose for the files as the document repository. The file names have to follow a very specific format . I don't think we (or others) use commas in the visit name, the PCSIDs, or the instrument names.
    image

  2. After the changes the module continues to work fine. Media can be uploaded et downloaded.
    image

  3. Tested with a file that contains a comma in the name also worked.
    image

Conclusions:
Looks good.

@racostas
Copy link
Contributor

racostas commented Jan 9, 2025

@victori444 , the PR looks good to my, still need to be rebased to solve de conflicts. Thanks you !!

@skarya22
Copy link
Contributor

Thank you rolando!

@victori444 victori444 force-pushed the 2024_12_12_Media_files_with_commas branch from 8333b49 to 92742ec Compare January 10, 2025 22:09
@racostas racostas self-requested a review January 16, 2025 15:08
Copy link
Contributor

@racostas racostas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retested after rebase: all looks good to me.

@racostas racostas added Passed manual tests PR has been successfully tested by at least one peer and removed State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) labels Jan 16, 2025
@driusan driusan merged commit 78e430f into aces:main Jan 17, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Passed manual tests PR has been successfully tested by at least one peer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants