I am using Filestack https://www.filestack.com/ as fileserver and Amazon S3 as filestorage as complete storage solution for my clients. Filestack offers CDN (Content Delivery Network) which serves file from nearest POP. Also i have chosen Redundant Storage for my bucket on Amazon S3. Now my question here is even though my images are stored at Amazon S3 and filestack, every-time a file is requested from filestack with its URL for ex, https://cdn.filepicker.io/api/file/h3C4wbHoTSaSltX354Ui why am i being charged at Amazon for Data Transfer I/O? I need to understand working between the two.
Asked
Active
Viewed 329 times
3 Answers
1
To set the cache-control headers for a filepicker.io URL you can add the following parameter: cache=true and it will set the headers to Cache-Control: max-age=315360000
For example: https://cdn.filepicker.io/api/file/h3C4wbHoTSaSltX354Ui?cache=true

David Makogon
- 2,768
- 1
- 20
- 29

Andrew Mione
- 111
- 1
-
that helped @Andrew .what about converted images? can it be saved in cache? so that everytime same conversion is not performed on the image? – skilledpeas Apr 19 '16 at 06:17
-
as per the documents given by **filepicker** converted images are saved if we are using _CDN_ based links for 30 days. Is there a way to increase cache time for converted images? – skilledpeas Apr 20 '16 at 13:22
0
Did you set the "cache-control" header on your files in the S3 bucket?
If not, the CDN will probably contact S3 on every request.

Jeroen Jacobs
- 1,386
- 3
- 16
- 25
-
-
Check out this answer on StackOverflow: http://stackoverflow.com/questions/22501465/how-to-add-cache-control-in-aws-s3 – Jeroen Jacobs Apr 14 '16 at 10:49
0
I just had a glance on Filestack, but not sure how it works. I guess S3 would be talking to your filestack using API.? In that case Amazon S3 has bandwidth charges, especially when it goes to Internet from AWS data center.

Vysakh
- 13
- 4
-
No i am not using any Amazon-S3 API, my images are uploaded on S3 via filepicker as it provides an interface to link your S3 bucket to filestack – skilledpeas Apr 14 '16 at 08:08
-
Not sure whether this will work, but try giving requester pays bucket option in S3, so that you wont be charged. – Vysakh Apr 14 '16 at 08:12