[6.x] Add chunked asset uploads and direct S3 multipart uploads - #19583
[6.x] Add chunked asset uploads and direct S3 multipart uploads#19583riasvdv wants to merge 7 commits into
Conversation
📚 Storybook previews@craftcms/ui — open Storybook No changed components detected in this Storybook. resources/js — open Storybook No changed components detected in this Storybook. |
a1359c1 to
ff7f82e
Compare
|
@timkelty can you check if this satisfies the needs of Cloud? |
| @@ -0,0 +1,307 @@ | |||
| import axios, {type AxiosRequestConfig, type AxiosResponse} from 'axios'; | |||
|
|
|||
| const client = axios.create({adapter: 'xhr'}); | |||
There was a problem hiding this comment.
Could we do this with native fetch? I have a dream to ditch axios if we can just because it's popular and frequently targeted for exploits. Not sure if that will make it in to 6, but it would be good to avoid hanging more functionality on it if we can.
There was a problem hiding this comment.
Rather than creating a new global object, I think I'd rather either stick this on the Craft. global
|
It looks like this creates its own queue for uploads but I’m wondering if it should just use the JS queue already established in the CP. Admittedly I haven’t checked on the state of that in a bit, but on the surface having two feels redundant |
brianjhanson
left a comment
There was a problem hiding this comment.
Nothing we can't fix or adjust later, just dropped a few thoughts throughout
There was a problem hiding this comment.
This should probably be a web component with the amount of UI it's handling.
Description
Adds support for chunked file uploads and direct s3 uploads through
Uploaders. Includes anupload-clientJS component which handles the chunked uploading to the URL, with the headers, supplied by the uploader.Also adds a persisted asset upload queue, so navigating away keeps uploads going
upload-navigation.mp4
See https://github.com/craftcms/cms/blob/feature/chunked-s3-uploads/docs/uploads.md