Merge pull request #373 from SvenRH/fix-coudflare-altnernate

Enable multipart uploads for all cloudflare uploads via uppy.
This commit is contained in:
Nevo David 2024-10-20 15:48:25 +07:00 committed by GitHub
commit 85df96d118
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,8 @@ export const getUppyUploadPlugin = (provider: string, fetch: any, backendUrl: st
return {
plugin: AwsS3Multipart,
options: {
shouldUseMultipart: (file : any) => true,
endpoint: '',
createMultipartUpload: async (file: any) => {
const arrayBuffer = await new Response(file.data).arrayBuffer();
const fileHash = sha256(Buffer.from(arrayBuffer));