Cleanup temp files and return to upload page after editing.
This commit is contained in:
@@ -148,6 +148,7 @@ function editor() {
|
||||
.then(response => response.json()) // convert to json
|
||||
.then(json => {
|
||||
console.log(json);
|
||||
window.location = '/uploads.html';
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user