Skip to content

Commit f7bb744

Browse files
author
Gusted
committed
Fix remove file on initial comment (go-gitea#20127)
- Backport go-gitea#20127 - Store the file uuid(which is returned by Gitea in the upload file response) onto the file object, so it can be used for the remove feature to specify this file. - Resolves go-gitea#20115
1 parent fb5ca1b commit f7bb744

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: web_src/js/features/common-global.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ export function initGlobalDropzone() {
192192
thumbnailWidth: 480,
193193
thumbnailHeight: 480,
194194
init() {
195-
this.on('success', (_file, data) => {
195+
this.on('success', (file, data) => {
196+
file.uuid = data.uuid;
196197
const input = $(`<input id="${data.uuid}" name="files" type="hidden">`).val(data.uuid);
197198
$dropzone.find('.files').append(input);
198199
});

0 commit comments

Comments
 (0)