Skip to content

Commit 6e22707

Browse files
author
Gusted
committed
Fix remove file on initial comment
- 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 97bfabc commit 6e22707

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)