Skip to content

[6.x] Add chunked asset uploads and direct S3 multipart uploads - #19583

Open
riasvdv wants to merge 7 commits into
6.xfrom
feature/chunked-s3-uploads
Open

[6.x] Add chunked asset uploads and direct S3 multipart uploads#19583
riasvdv wants to merge 7 commits into
6.xfrom
feature/chunked-s3-uploads

Conversation

@riasvdv

@riasvdv riasvdv commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Description

Adds support for chunked file uploads and direct s3 uploads through Uploaders. Includes an upload-client JS 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

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/uiopen Storybook

No changed components detected in this Storybook.

resources/jsopen Storybook

No changed components detected in this Storybook.

@riasvdv
riasvdv force-pushed the feature/chunked-s3-uploads branch from a1359c1 to ff7f82e Compare September 9, 2026 11:09
@riasvdv
riasvdv marked this pull request as ready for review September 9, 2026 13:17
@riasvdv
riasvdv requested a review from timkelty September 9, 2026 13:17
@riasvdv

riasvdv commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@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'});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread resources/js/uploads.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than creating a new global object, I think I'd rather either stick this on the Craft. global

Copy link
Copy Markdown
Contributor

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 brianjhanson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing we can't fix or adjust later, just dropped a few thoughts throughout

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be a web component with the amount of UI it's handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants