浏览代码

add deleteUrl when uploading a file

Pitu 6 年之前
父节点
当前提交
c8e0ebd8ff
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/api/routes/files/uploadPOST.js

+ 2 - 2
src/api/routes/files/uploadPOST.js

@@ -163,8 +163,8 @@ class uploadPOST extends Route {
 			message: 'Successfully uploaded file',
 			name: upload.filename,
 			size: upload.size,
-			url: `${process.env.DOMAIN}/${upload.filename}`
-			// deleteUrl: `${process.env.DOMAIN}/api/file/${exists.id}`
+			url: `${process.env.DOMAIN}/${upload.filename}`,
+			deleteUrl: `${process.env.DOMAIN}/api/file/${insertedId[0]}`
 		});
 
 		/*