Add converting from URL#11
Open
strawberry-raccoon wants to merge 3 commits intoswe-productivity:mainfrom
Open
Conversation
93bc654 to
93e2631
Compare
C4illin
requested changes
Feb 16, 2026
Collaborator
C4illin
left a comment
There was a problem hiding this comment.
Well done! Just two minor comments
| import { randomUUID } from "node:crypto"; | ||
|
|
||
| const getFilename = (url: string, headers: Headers) => { | ||
| const contentDisposition = headers.get("Content-Disposition"); |
Collaborator
There was a problem hiding this comment.
If it doesn't contain the Content-Disposition header nor include a proper filename in the url, maybe we could use content-type header? It would require a big map though.
For example, I tested with unsplash and the images doesn't contain a file extension which causes the converted image to then only be named after the file extension. Test with converting this for example https://images.unsplash.com/photo-1464550838636-1a3496df938b
Co-authored-by: Emrik Östling <emrik.ostling@gmail.com>
93e2631 to
74c3866
Compare
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.
Closes #7