Support files without extensions in importFromUrl#1873
Merged
ildyria merged 11 commits intoLycheeOrg:masterfrom Jun 17, 2023
wladif:master
Merged
Support files without extensions in importFromUrl#1873ildyria merged 11 commits intoLycheeOrg:masterfrom wladif:master
ildyria merged 11 commits intoLycheeOrg:masterfrom
wladif:master
Conversation
ildyria
reviewed
Jun 13, 2023
ildyria
reviewed
Jun 13, 2023
ildyria
reviewed
Jun 13, 2023
Member
|
To make it easier for you in the future, I suggest when you want to add a feature to create a new branch instead of doing it on master on your side :) |
Contributor
Author
|
Cool! Thanks! Is there any issue that I still need to address? |
ildyria
approved these changes
Jun 17, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the enhancement #1652.
It extends the importFromUrl logic to support importing of images from URLs without any extension.
Caveats:
SAMPLE_DOWNLOAD_TIFF_WITHOUT_EXTENSIONneeds to be updated to point to Lychee repo once this PR is merged. I'll do in a future PR.application/octet-streamwhen file doesn't have an extension, this means that the branchelseif (isset($originalMimeType) && self::isSupportedMimeType($originalMimeType))is not covered by current tests. If you know a provider/way to host the sample files (mongolia&tiff) without extension so that the web server will set the Content Type correctly (e.g.image/jpeg), please let me know and I'll add the tests. Thanks!