mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[GH-ISSUE #450] Documentation for image upload #167
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @peraronsson on GitHub (May 22, 2024).
Original GitHub issue: https://github.com/flyimg/flyimg/issues/450
Originally assigned to: @sadok-f on GitHub.
Hello, and thanks for a great application!
We have deployed Flyimg on AWS with S3 storage. How do we ingest images to the storage? Are there any naming conventions to follow in order to be able to request the images from the web server? Can we organise images into "folders" and "sub-folders" in the storage? Is there an api for importing images? I have browsed the documentation, but didn't find anything on this topic.
@sadok-f commented on GitHub (May 22, 2024):
Hi @peraronsson
thank you for opening this issue.
I'll try to answer your questions:
How do we ingest images to the storage?: the images are fetched when the source passed to the second URL parameter, such as/upload/q_90/https://picsum.photos/200/300when this image gets generated the first time Flyimg will store the source image and the generated image in the System Storage configured, which in your case S3Are there any naming conventions to follow in order to be able to request the images from the web serverNo, but if the source image contains some parameters, then it is better to URL encode the whole URL source.Can we organise images into "folders" and "sub-folders" in the storageNo, the images are stored in the main folder.The caching system hashes each image along with its parameters in the upload folder to be able to fetch it later on.
I hope that answers your questions, please feel free to add more details about your setup.
@peraronsson commented on GitHub (May 22, 2024):
When using the upload call, like
/upload/q_90/https://picsum.photos/200/300, will the image be stored permanently, or is this actually the cache that you are populating?@sadok-f commented on GitHub (May 23, 2024):
the source image will be stored permanently, so the next call will fetch from the local folder, to fetch again the image from the source the refresh option should be used
rf_1@peraronsson commented on GitHub (May 23, 2024):
It seems a bit risky to have this upload feature without any api key or similar. A malicious person could potentially upload huge amounts of images and exhaust the storage... Is there any way to prevent that?
@sadok-f commented on GitHub (May 23, 2024):
well there is
restricted_domainsoption where it allows images only from a defined list of domains: https://github.com/flyimg/flyimg/blob/main/docs/full-documentation.md#security-restricting-source-domainsAnother option is to use Signature Generation:
https://github.com/flyimg/flyimg/blob/main/docs/full-documentation.md#security-signature-generation
@sadok-f commented on GitHub (May 28, 2024):
Hi @peraronsson
did the comments here answer your questions? if yes can we close the issue then?
@peraronsson commented on GitHub (May 28, 2024):
Yes, thank you!