Parcourir la source

add deleteUrl when uploading a file

Pitu il y a 6 ans
Parent
commit
c8e0ebd8ff
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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]}`
 		});
 
 		/*