Cleanup temp files and return to upload page after editing.

This commit is contained in:
2021-12-29 21:55:29 +10:30
parent 563de29fcf
commit 2f5bb2ff36
3 changed files with 9 additions and 3 deletions

View File

@@ -148,6 +148,7 @@ function editor() {
.then(response => response.json()) // convert to json
.then(json => {
console.log(json);
window.location = '/uploads.html';
})
}

View File

@@ -273,6 +273,7 @@ func (ws *WebService) modifyUpload(w http.ResponseWriter, r *http.Request) {
return
} else if change == "skip" {
anUpload.State = upload.StateSkipped
anUpload.RemoveMarkupTempFile()
res := StartUploadResponse{Success: true, Message: "upload skipped"}
resString, _ := json.Marshal(res)
w.Write(resString)