FIX: Regression allowing async calls to finish before removing uploads (#30230)

This PR fixes a recent regression in e37952c9db that reverted a fix made in 1c4d5dae1c, which allowed for async calls to finish first before removing in progress uploads.
This commit is contained in:
Keegan George 2024-12-12 03:35:46 +09:00 committed by GitHub
parent 02eca6e489
commit c9119099a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -356,15 +356,15 @@ export default class UppyComposerUpload {
}
let upload = response.body;
// Only remove in progress after async resolvers finish:
this.#removeInProgressUpload(file.id);
cacheShortUploadUrl(upload.short_url, upload);
const markdown = await this.uploadMarkdownResolvers.reduce(
(md, resolver) => resolver(upload) || md,
getUploadMarkdown(upload)
);
// Only remove in progress after async resolvers finish:
this.#removeInProgressUpload(file.id);
cacheShortUploadUrl(upload.short_url, upload);
new ComposerVideoThumbnailUppy(getOwner(this)).generateVideoThumbnail(
file,
upload.url,