1

When users upload assets to a Craft CMS site setup to use AWS, do the assets go directly to AWS or are they uploaded to the Craft server first?

The reason I ask is I'm building an area where users upload potentially large files from the frontend, and it's quite likely a lot of users will choose to do it at the same time.

If the files are uploaded to the Craft server first, I might have to spec-up the server a bit more and would welcome any tips for helping Craft handle the multiple large uploads as efficiently as possible.

If the files are simply uploaded to AWS, I take it that means there will be little impact on the Craft server and I won't need to worry about any of this. Is that right?

6
  • They are uploaded to Craft first to a temporary file, then Assets uses the Asset Source to work out where to send them next - either the local file system or a remote one. For handling large uploads in general you could look at this plugin: superbig.co/plugins/large-upload Commented Mar 3, 2017 at 10:28
  • Hi Josh. That's a bummer. I've signed up to be notified when that plugin is ready. I guess if a large file is sent to both the Craft server and then from there to Amazon AWS, that's a double whammy. Ouch. Commented Mar 3, 2017 at 10:32
  • Yep, but I think it has to be so that Craft can log all the file meta (height, width, file size, file kind etc) as well as index it for searching etc. Commented Mar 3, 2017 at 10:57
  • @JoshAngell you should add that as an answer. :)
    – Brad Bell
    Commented Mar 3, 2017 at 18:03
  • @BradBell done! It could definitely be improved upon ... Commented Mar 3, 2017 at 18:06

2 Answers 2

3

They are uploaded to Craft first to a temporary file, then Assets uses the Asset Source to work out where to send them next - either the local file system or a remote one.

For handling large uploads in general you could look at this plugin: https://superbig.co/plugins/large-upload

0
1

A simple but inelegant workaround for very large files is to upload them directly to the AWS bucket and then update the Asset Index in the Craft CP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.