mirror of
https://github.com/discourse/discourse.git
synced 2025-06-14 06:12:55 +08:00
FIX: Regression allowing async calls to finish before removing uploads (#30230)
This PR fixes a recent regression ine37952c9db
that reverted a fix made in1c4d5dae1c
, which allowed for async calls to finish first before removing in progress uploads.
This commit is contained in:
@ -356,15 +356,15 @@ export default class UppyComposerUpload {
|
|||||||
}
|
}
|
||||||
let upload = response.body;
|
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(
|
const markdown = await this.uploadMarkdownResolvers.reduce(
|
||||||
(md, resolver) => resolver(upload) || md,
|
(md, resolver) => resolver(upload) || md,
|
||||||
getUploadMarkdown(upload)
|
getUploadMarkdown(upload)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Only remove in progress after async resolvers finish:
|
||||||
|
this.#removeInProgressUpload(file.id);
|
||||||
|
cacheShortUploadUrl(upload.short_url, upload);
|
||||||
|
|
||||||
new ComposerVideoThumbnailUppy(getOwner(this)).generateVideoThumbnail(
|
new ComposerVideoThumbnailUppy(getOwner(this)).generateVideoThumbnail(
|
||||||
file,
|
file,
|
||||||
upload.url,
|
upload.url,
|
||||||
|
Reference in New Issue
Block a user