aboutsummaryrefslogtreecommitdiff
path: root/src/api/routes/uploads
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2020-07-19 22:35:59 +0300
committerZephyrrus <[email protected]>2020-07-19 22:35:59 +0300
commit645b62b81dc46b2e2bdea0fbe30c36c4e0ff4a48 (patch)
tree4c454e816b699ead53d225afadfb528649d126f7 /src/api/routes/uploads
parentfeat: Start working on a new album/tags/image info modal (diff)
parentUpdate setup script (diff)
downloadhost.fuwn.me-645b62b81dc46b2e2bdea0fbe30c36c4e0ff4a48.tar.xz
host.fuwn.me-645b62b81dc46b2e2bdea0fbe30c36c4e0ff4a48.zip
Merge branch 'dev' into dev-zephy
Diffstat (limited to 'src/api/routes/uploads')
-rw-r--r--src/api/routes/uploads/uploadPOST.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/routes/uploads/uploadPOST.js b/src/api/routes/uploads/uploadPOST.js
index 99f5ee5..3e67293 100644
--- a/src/api/routes/uploads/uploadPOST.js
+++ b/src/api/routes/uploads/uploadPOST.js
@@ -117,6 +117,7 @@ class uploadPOST extends Route {
this.saveFileToAlbum(db, albumId, insertedId);
}
+ uploadedFile = Util.constructFilePublicLink(uploadedFile);
return res.status(201).send({
message: 'Sucessfully uploaded the file.',
...uploadedFile,
@@ -125,6 +126,7 @@ class uploadPOST extends Route {
}
fileExists(res, exists, filename) {
+ exists = Util.constructFilePublicLink(exists);
res.json({
message: 'Successfully uploaded the file.',
name: exists.name,