Skip to content

Commit

Permalink
fix: upload data during creation only for files above the chunk size (#…
Browse files Browse the repository at this point in the history
…28388)

fix: upload data during creation only for files above 6MB
  • Loading branch information
fenos authored Aug 15, 2024
1 parent 23da9e8 commit 82a55e9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 712,7 @@ class StorageExplorerStore {

// Max chunk size is 500MB
chunkSize = Math.min(chunkSize, 500 * 1024 * 1024)
const uploadDataDuringCreation = file.size <= chunkSize

const upload = new tus.Upload(file, {
endpoint: this.resumableUploadUrl,
Expand All @@ -720,7 721,7 @@ class StorageExplorerStore {
authorization: `Bearer ${this.serviceKey}`,
'x-source': 'supabase-dashboard',
},
uploadDataDuringCreation: true,
uploadDataDuringCreation: uploadDataDuringCreation,
removeFingerprintOnSuccess: true,
metadata: {
bucketName: this.selectedBucket.name,
Expand Down

0 comments on commit 82a55e9

Please sign in to comment.