Set default timeout to 3 minutes when uploading files (#6399)

This commit is contained in:
Elias Nahum 2022-06-17 04:52:50 -04:00 committed by GitHub
parent 0278df6173
commit 6ea08b9dc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,6 +72,7 @@ const ClientFiles = (superclass: any) => class extends superclass {
channel_id: channelId,
},
},
timeoutInterval: 3 * 60 * 1000, // 3 minutes
};
const promise = this.apiClient.upload(url, file.localPath, options) as ProgressPromise<ClientResponse>;
promise.progress!(onProgress).then(onComplete).catch(onError);