1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-12-26 01:18:21 +01:00

VFS shall delete file after upload
All checks were successful
gitea-sync/antd-web-apps/pipeline/head This commit looks good

This commit is contained in:
Dany LE 2023-01-04 21:45:43 +01:00 committed by GitHub
parent b10ecfc259
commit 93b6ca18ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,6 +153,7 @@ vfs.upload = function(path)
local ret = ulib.move(REQUEST["upload-"..index..".tmp"], file) local ret = ulib.move(REQUEST["upload-"..index..".tmp"], file)
if not ret then if not ret then
ret = ulib.send_file(REQUEST["upload-"..index..".tmp"], file) ret = ulib.send_file(REQUEST["upload-"..index..".tmp"], file)
ulib.delete(REQUEST["upload-"..index..".tmp"])
end end
if not ret then if not ret then
return false, "Unable to copy file" return false, "Unable to copy file"