[GH-ISSUE #450] Documentation for image upload #774

Closed
opened 2026-03-15 15:22:34 +03:00 by kerem · 7 comments
Owner

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.

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.
kerem 2026-03-15 15:22:34 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@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/300 when 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 S3
  • Are there any naming conventions to follow in order to be able to request the images from the web server No, 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 storage No, 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.

<!-- gh-comment-id:2124712255 --> @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/300` when 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 S3 - `Are there any naming conventions to follow in order to be able to request the images from the web server` No, 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 storage` No, 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.
Author
Owner

@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?

<!-- gh-comment-id:2125100122 --> @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?
Author
Owner

@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

<!-- gh-comment-id:2126441914 --> @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`
Author
Owner

@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?

<!-- gh-comment-id:2127112081 --> @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?
Author
Owner

@sadok-f commented on GitHub (May 23, 2024):

well there is restricted_domains option 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-domains

Another option is to use Signature Generation:
https://github.com/flyimg/flyimg/blob/main/docs/full-documentation.md#security-signature-generation

<!-- gh-comment-id:2127429730 --> @sadok-f commented on GitHub (May 23, 2024): well there is `restricted_domains` option 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-domains Another option is to use Signature Generation: https://github.com/flyimg/flyimg/blob/main/docs/full-documentation.md#security-signature-generation
Author
Owner

@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?

<!-- gh-comment-id:2134932394 --> @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?
Author
Owner

@peraronsson commented on GitHub (May 28, 2024):

Yes, thank you!

<!-- gh-comment-id:2134967342 --> @peraronsson commented on GitHub (May 28, 2024): Yes, thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/flyimg#774
No description provided.