Cache On S3

ba2020

New Member
Apr 17, 2021
3
1
3
Great script. I was able to get everything installed and set up properly. I'm wondering if it's possible for the upload cache to also live on S3. We are planning on using this script instead of Dropbox because we always reach our bandwidth limitations with Dropbox (even though we are on the highest plan available). When I upload images, I notice that the thumbnails are being served from the web server instead of S3. IE: https://files.mydomain.com/cache/plugins/filepreviewer/4/663a860924c7afe95c0add9fc745ed84b6ffaa97af0a1a22e992de6c7714a2d4/1100x800_cropped.jpg

I feel like this would cause a heavy load on our server. Can this be set up to serve from S3 instead? Could you also explain to me how uploaded files are being served from S3 at all? I don't see any S3 links being used.

Thanks for your help in advance.
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
I was able to get everything installed and set up properly. I'm wondering if it's possible for the upload cache to also live on S3. We are planning on using this script instead of Dropbox because we always reach our bandwidth limitations with Dropbox (even though we are on the highest plan available). When I upload images, I notice that the thumbnails are being served from the web server instead of S3. IE: https://files.mydomain.com/cache/plugins/filepreviewer/4/663a860924c7afe95c0add9fc745ed84b6ffaa97af0a1a22e992de6c7714a2d4/1100x800_cropped.jpg

I feel like this would cause a heavy load on our server. Can this be set up to serve from S3 instead?
Not at the moment. Although you can use a CDN to serve the images. Via the edit file server popup, see the CDN tab. It'll still create the image previews on your server, however they'll be sent via the CDN after the first request.

Could you also explain to me how uploaded files are being served from S3 at all? I don't see any S3 links being used.
They're routed via the script using the S3 API. There's no direct S3 links at the moment, so the user will always see your url.
 
  • Like
Reactions: ba2020

ba2020

New Member
Apr 17, 2021
3
1
3
Thanks for the response. One more questions - is there a way to offer direct link downloads for folders? We want to give links that will automatically trigger a zip download of a folder. It seems the only way this happens now is from an action taken by a user, triggering a folder download via ajax. Is that the only way? Any suggestions on how I could custom code this feature if it's not already available?
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
is there a way to offer direct link downloads for folders?
Not at the moment. You can share a link to a folder, then the user can click to download it as a zip. I guess you could amend it to append a parameter on the end of the url like "?download_zip=true". The problem would be that the zip file needs to be generated before download, so it can never be an immediate download. You'd still need to show the progress popup with the zip file being generated.

Also, what can cause direct downloads to take so long to start the download?
Normally it's filesize. When downloading the file, the script has to retrieve it from S3 first. For large files you may notice a delay. We're looking at direct downloads from S3 which should help with this, but there's nothing available just yet.

Please remove links after you are able to look into this issue.
Done.
 

ba2020

New Member
Apr 17, 2021
3
1
3
OK thanks. This maybe isn't the right solution for me then but I appreciate your feedback.
 
  • Like
Reactions: adam