mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 03:08:34 +00:00
don't close socket when pausing
because it prevented us from canceling an upload that is paused note that we here sacrifice the ability to pause uploads and have other uploads take over the paused upload's rate limit queue spot. this is sacrificed because we will soon remove the ability to pause/resume uploads anyways
This commit is contained in:
parent
2ec49b250c
commit
e4dbe77d2f
1 changed files with 1 additions and 10 deletions
|
|
@ -87,7 +87,7 @@ export default class RequestClient {
|
|||
return stripSlash(companion && companion[host] ? companion[host] : host)
|
||||
}
|
||||
|
||||
async headers (emptyBody = false) {
|
||||
async headers(emptyBody = false) {
|
||||
const defaultHeaders = {
|
||||
Accept: 'application/json',
|
||||
...(emptyBody ? undefined : {
|
||||
|
|
@ -397,15 +397,6 @@ export default class RequestClient {
|
|||
|
||||
isPaused = newPausedState
|
||||
if (socket) sendState()
|
||||
|
||||
if (newPausedState) {
|
||||
// Remove this file from the queue so another file can start in its place.
|
||||
socketAbortController?.abort?.() // close socket to free up the request for other uploads
|
||||
} else {
|
||||
// Resuming an upload should be queued, else you could pause and then
|
||||
// resume a queued upload to make it skip the queue.
|
||||
createWebsocket()
|
||||
}
|
||||
}
|
||||
|
||||
const onFileRemove = (targetFile) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue