Enable multipart uploads for all cloudflare uploads via uppy. this fixes upload errors with files < 100MB
This commit is contained in:
parent
b4976d5a30
commit
77405deb35
|
|
@ -25,6 +25,9 @@ export const getUppyUploadPlugin = (provider: string, fetch: any, backendUrl: st
|
||||||
return {
|
return {
|
||||||
plugin: AwsS3Multipart,
|
plugin: AwsS3Multipart,
|
||||||
options: {
|
options: {
|
||||||
|
shouldUseMultipart(file : any) {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
createMultipartUpload: async (file: any) => {
|
createMultipartUpload: async (file: any) => {
|
||||||
const arrayBuffer = await new Response(file.data).arrayBuffer();
|
const arrayBuffer = await new Response(file.data).arrayBuffer();
|
||||||
const fileHash = sha256(Buffer.from(arrayBuffer));
|
const fileHash = sha256(Buffer.from(arrayBuffer));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue