Skip to content

Commit a8ede19

Browse files
committed
fix(uploads): remove abort listener on xhr timeout
1 parent 42ec45f commit a8ede19

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/sim/lib/uploads/client/direct-upload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ const uploadViaPresignedPut = (opts: UploadViaPutOptions): Promise<void> => {
229229
const timeoutId = setTimeout(() => {
230230
if (isCompleted) return
231231
isCompleted = true
232+
signal?.removeEventListener('abort', abortHandler)
232233
xhr.abort()
233234
reject(new DirectUploadError(`Upload timeout for ${file.name}`, 'DIRECT_UPLOAD_ERROR'))
234235
}, timeoutMs)

0 commit comments

Comments
 (0)