mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
upload: Fix uploading the same file twice in the same session.
This commit fixes a bug where uploading the same file a second time in the same browser session would appear to the user to stall with `Uploading [filename]...` in the composebox. This is because `tus-js-client` makes a HEAD request to check for already-uploaded files -- and, if found, that request is used in the `upload-success` callback. That left the callback with no response body to parse, to know what URL to insert. Store the `/user_uploads/...` URL in the file metadata after a successful upload, and if the fingerprint matches a previous upload, pull that URL (and filename, as it may have changed server-side) out of the previous upload's metadata. Co-authored-by: Shubham Padia <shubham@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
098228a210
commit
c2e0a27d2c
@@ -18,6 +18,7 @@
|
||||
"@uppy/drag-drop": "^4.0.2",
|
||||
"@uppy/progress-bar": "^4.0.0",
|
||||
"@uppy/tus": "^4.1.5",
|
||||
"@uppy/utils": "^6.1.3",
|
||||
"@zxcvbn-ts/core": "^3.0.1",
|
||||
"@zxcvbn-ts/language-common": "^3.0.2",
|
||||
"@zxcvbn-ts/language-en": "^3.0.1",
|
||||
|
||||
Reference in New Issue
Block a user