@tiledesk/tiledesk-server 2.14.24 → 2.14.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/routes/files.js +16 -14
- package/routes/images.js +221 -216
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
|
7
7
|
|
|
8
|
+
|
|
9
|
+
# 2.14.25
|
|
10
|
+
- Deprecate user file upload routes in files.js and images.js
|
|
11
|
+
|
|
8
12
|
# 2.14.24
|
|
9
13
|
- Improved extension management on file uploading to support .wav and .svg
|
|
10
14
|
|
package/package.json
CHANGED
package/routes/files.js
CHANGED
|
@@ -38,15 +38,16 @@ curl -u andrea.leo@f21.it:123456 \
|
|
|
38
38
|
|
|
39
39
|
*/
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
// DEPRECATED FROM VERSION 2.14.24
|
|
42
|
+
// router.post('/users', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken], upload.single('file'), (req, res, next) => {
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
// winston.verbose("files/users")
|
|
45
|
+
// return res.status(201).json({
|
|
46
|
+
// message: 'File uploded successfully',
|
|
47
|
+
// filename: req.file.filename
|
|
48
|
+
// });
|
|
48
49
|
|
|
49
|
-
});
|
|
50
|
+
// });
|
|
50
51
|
|
|
51
52
|
/*
|
|
52
53
|
curl \
|
|
@@ -57,13 +58,14 @@ curl \
|
|
|
57
58
|
|
|
58
59
|
*/
|
|
59
60
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
61
|
+
// DEPRECATED FROM VERSION 2.14.24
|
|
62
|
+
// router.post('/public', upload.single('file'), (req, res, next) => {
|
|
63
|
+
// winston.debug("files/public")
|
|
64
|
+
// return res.status(201).json({
|
|
65
|
+
// message: 'File uploded successfully',
|
|
66
|
+
// filename: req.file.filename
|
|
67
|
+
// });
|
|
68
|
+
// });
|
|
67
69
|
|
|
68
70
|
|
|
69
71
|
|
package/routes/images.js
CHANGED
|
@@ -68,40 +68,41 @@ curl -u andrea.leo@f21.it:123456 \
|
|
|
68
68
|
|
|
69
69
|
*/
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
71
|
+
// DEPRECATED FROM VERSION 2.14.24
|
|
72
|
+
// router.post('/users', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken],
|
|
73
|
+
// // bodymiddleware,
|
|
74
|
+
// upload.single('file'), (req, res, next) => {
|
|
75
|
+
// try {
|
|
76
|
+
// // winston.info("req.query.folder1:"+req.body.folder);
|
|
77
|
+
|
|
78
|
+
// var folder = req.folder || "error";
|
|
79
|
+
// winston.debug("folder:"+folder);
|
|
80
|
+
|
|
81
|
+
// var destinationFolder = 'uploads/users/' + req.user.id + "/images/" + folder +"/";
|
|
82
|
+
// winston.debug("destinationFolder",destinationFolder);
|
|
83
|
+
|
|
84
|
+
// var thumFilename = destinationFolder+'thumbnails_200_200-' + req.file.originalname;
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
// fileService.getFileDataAsBuffer(req.file.filename).then(function(buffer) {
|
|
88
|
+
|
|
89
|
+
// sharp(buffer).resize(200, 200).toBuffer((err, resizeImage, info) => {
|
|
90
|
+
// //in prod nn genera thumb
|
|
91
|
+
// if (err) { winston.error("Error generating thumbnail", err); }
|
|
92
|
+
// fileService.createFile ( thumFilename, resizeImage, undefined, undefined);
|
|
93
|
+
// });
|
|
94
|
+
|
|
95
|
+
// return res.status(201).json({
|
|
96
|
+
// message: 'Image uploded successfully',
|
|
97
|
+
// filename: encodeURIComponent(req.file.filename),
|
|
98
|
+
// thumbnail: encodeURIComponent(thumFilename)
|
|
99
|
+
// });
|
|
100
|
+
// });
|
|
101
|
+
// } catch (error) {
|
|
102
|
+
// winston.error('Error uploading user image.',error);
|
|
103
|
+
// return res.status(500).send({success: false, msg: 'Error uploading user image.'});
|
|
104
|
+
// }
|
|
105
|
+
// });
|
|
105
106
|
|
|
106
107
|
|
|
107
108
|
|
|
@@ -121,46 +122,48 @@ curl -v -X PUT -u andrea.leo@f21.it:123456 \
|
|
|
121
122
|
https://tiledesk-server-pre.herokuapp.com/images/users/
|
|
122
123
|
|
|
123
124
|
*/
|
|
124
|
-
router.put('/users', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken],
|
|
125
|
-
// bodymiddleware,
|
|
126
|
-
uploadFixedFolder.single('file'), (req, res, next) => {
|
|
127
|
-
try {
|
|
128
|
-
winston.debug("/users/folder");
|
|
129
|
-
// winston.info("req.query.folder1:"+req.body.folder);
|
|
130
|
-
|
|
131
|
-
// var folder = req.folder || "error";
|
|
132
|
-
// winston.info("folder:"+folder);
|
|
133
|
-
|
|
134
|
-
if (req.upload_file_already_exists) {
|
|
135
|
-
winston.warn('Error uploading photo image, file already exists',req.file.filename );
|
|
136
|
-
return res.status(409).send({success: false, msg: 'Error uploading user image, file already exists'});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
var destinationFolder = 'uploads/users/' + req.user.id + "/images/";
|
|
140
|
-
winston.debug("destinationFolder",destinationFolder);
|
|
141
|
-
|
|
142
|
-
var thumFilename = destinationFolder+'thumbnails_200_200-' + req.file.originalname;
|
|
143
125
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
126
|
+
// DEPRECATED FROM VERSION 2.14.24
|
|
127
|
+
// router.put('/users', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken],
|
|
128
|
+
// // bodymiddleware,
|
|
129
|
+
// uploadFixedFolder.single('file'), (req, res, next) => {
|
|
130
|
+
// try {
|
|
131
|
+
// winston.debug("/users/folder");
|
|
132
|
+
// // winston.info("req.query.folder1:"+req.body.folder);
|
|
133
|
+
|
|
134
|
+
// // var folder = req.folder || "error";
|
|
135
|
+
// // winston.info("folder:"+folder);
|
|
136
|
+
|
|
137
|
+
// if (req.upload_file_already_exists) {
|
|
138
|
+
// winston.warn('Error uploading photo image, file already exists',req.file.filename );
|
|
139
|
+
// return res.status(409).send({success: false, msg: 'Error uploading user image, file already exists'});
|
|
140
|
+
// }
|
|
141
|
+
|
|
142
|
+
// var destinationFolder = 'uploads/users/' + req.user.id + "/images/";
|
|
143
|
+
// winston.debug("destinationFolder",destinationFolder);
|
|
144
|
+
|
|
145
|
+
// var thumFilename = destinationFolder+'thumbnails_200_200-' + req.file.originalname;
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
// fileService.getFileDataAsBuffer(req.file.filename).then(function(buffer) {
|
|
149
|
+
|
|
150
|
+
// sharp(buffer).resize(200, 200).toBuffer((err, resizeImage, info) => {
|
|
151
|
+
// //in prod nn genera thumb
|
|
152
|
+
// if (err) { winston.error("Error generating thumbnail", err); }
|
|
153
|
+
// fileService.createFile ( thumFilename, resizeImage, undefined, undefined);
|
|
154
|
+
// });
|
|
155
|
+
|
|
156
|
+
// return res.status(201).json({
|
|
157
|
+
// message: 'Image uploded successfully',
|
|
158
|
+
// filename: encodeURIComponent(req.file.filename),
|
|
159
|
+
// thumbnail: encodeURIComponent(thumFilename)
|
|
160
|
+
// });
|
|
161
|
+
// });
|
|
162
|
+
// } catch (error) {
|
|
163
|
+
// winston.error('Error uploading user image.',error);
|
|
164
|
+
// return res.status(500).send({success: false, msg: 'Error uploading user image.'});
|
|
165
|
+
// }
|
|
166
|
+
// });
|
|
164
167
|
|
|
165
168
|
|
|
166
169
|
|
|
@@ -186,81 +189,82 @@ curl -v -X PUT -u andrea.leo@f21.it:123456 \
|
|
|
186
189
|
https://tiledesk-server-pre.herokuapp.com/images/users/photo
|
|
187
190
|
|
|
188
191
|
*/
|
|
189
|
-
|
|
190
|
-
//
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
192
|
+
// DEPRECATED FROM VERSION 2.14.24
|
|
193
|
+
// router.put('/users/photo', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken],
|
|
194
|
+
// // bodymiddleware,
|
|
195
|
+
// uploadAvatar.single('file'), async (req, res, next) => {
|
|
196
|
+
// try {
|
|
197
|
+
// winston.debug("/users/photo");
|
|
198
|
+
|
|
199
|
+
// if (req.upload_file_already_exists) {
|
|
200
|
+
// winston.warn('Error uploading photo image, file already exists',req.file.filename );
|
|
201
|
+
// return res.status(409).send({success: false, msg: 'Error uploading photo image, file already exists'});
|
|
202
|
+
// }
|
|
203
|
+
|
|
204
|
+
// let userid = req.user.id;
|
|
205
|
+
// let bot_id;
|
|
206
|
+
// let entity_id = userid;
|
|
207
|
+
|
|
208
|
+
// // if (req.query.user_id) {
|
|
209
|
+
// // userid = req.query.user_id;
|
|
210
|
+
// // }
|
|
207
211
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
});
|
|
212
|
+
// if (req.query.bot_id) {
|
|
213
|
+
// bot_id = req.query.bot_id;
|
|
214
|
+
|
|
215
|
+
// let chatbot = await faq_kb.findById(bot_id).catch((err) => {
|
|
216
|
+
// winston.error("Error finding bot ", err);
|
|
217
|
+
// return res.status(500).send({ success: false, error: "Unable to find chatbot with id " + bot_id });
|
|
218
|
+
// })
|
|
219
|
+
|
|
220
|
+
// if (!chatbot) {
|
|
221
|
+
// return res.status(404).send({ success: false, error: "Chatbot not found" })
|
|
222
|
+
// }
|
|
223
|
+
|
|
224
|
+
// let id_project = chatbot.id_project;
|
|
225
|
+
|
|
226
|
+
// let puser = await project_user.findOne({ id_user: userid, id_project: id_project }).catch((err) => {
|
|
227
|
+
// winston.error("Error finding project user: ", err);
|
|
228
|
+
// return res.status(500).send({ success: false, error: "Unable to find project user for user " + userid + "in project " + id_project });
|
|
229
|
+
// })
|
|
230
|
+
// if (!puser) {
|
|
231
|
+
// winston.warn("User" + userid + "don't belongs the project " + id_project);
|
|
232
|
+
// return res.status(401).send({ success: false, error: "You don't belong the chatbot's project" })
|
|
233
|
+
// }
|
|
234
|
+
|
|
235
|
+
// if ((puser.role !== roleConstants.ADMIN) && (puser.role !== roleConstants.OWNER)) {
|
|
236
|
+
// winston.warn("User with role " + puser.role + "can't modify the chatbot");
|
|
237
|
+
// return res.status(403).send({ success: false, error: "You don't have the role required to modify the chatbot" });
|
|
238
|
+
// }
|
|
239
|
+
|
|
240
|
+
// entity_id = bot_id;
|
|
241
|
+
// }
|
|
242
|
+
|
|
243
|
+
// var destinationFolder = 'uploads/users/' + entity_id + "/images/";
|
|
244
|
+
// winston.debug("destinationFolder:"+destinationFolder);
|
|
245
|
+
|
|
246
|
+
// var thumFilename = destinationFolder+'thumbnails_200_200-photo.jpg';
|
|
247
|
+
|
|
248
|
+
// winston.debug("req.file.filename:"+req.file.filename);
|
|
249
|
+
// fileService.getFileDataAsBuffer(req.file.filename).then(function(buffer) {
|
|
250
|
+
|
|
251
|
+
// sharp(buffer).resize(200, 200).toBuffer((err, resizeImage, info) => {
|
|
252
|
+
// //in prod nn genera thumb
|
|
253
|
+
// if (err) { winston.error("Error generating thumbnail", err); }
|
|
254
|
+
// fileService.createFile ( thumFilename, resizeImage, undefined, undefined);
|
|
255
|
+
// });
|
|
256
|
+
|
|
257
|
+
// return res.status(201).json({
|
|
258
|
+
// message: 'Image uploded successfully',
|
|
259
|
+
// filename: encodeURIComponent(req.file.filename),
|
|
260
|
+
// thumbnail: encodeURIComponent(thumFilename)
|
|
261
|
+
// });
|
|
262
|
+
// });
|
|
263
|
+
// } catch (error) {
|
|
264
|
+
// winston.error('Error uploading user image.',error);
|
|
265
|
+
// return res.status(500).send({success: false, msg: 'Error uploading user image.'});
|
|
266
|
+
// }
|
|
267
|
+
// });
|
|
264
268
|
|
|
265
269
|
|
|
266
270
|
|
|
@@ -276,57 +280,57 @@ curl -v -X DELETE -u andrea.leo@frontiere21.it:123 \
|
|
|
276
280
|
|
|
277
281
|
*/
|
|
278
282
|
|
|
279
|
-
router.delete('/users', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken], (req, res, next) => {
|
|
280
|
-
|
|
281
|
-
|
|
283
|
+
// router.delete('/users', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken], (req, res, next) => {
|
|
284
|
+
// try {
|
|
285
|
+
// winston.debug("delete /users");
|
|
282
286
|
|
|
283
|
-
|
|
284
|
-
|
|
287
|
+
// let path = req.query.path;
|
|
288
|
+
// winston.debug("path:"+path);
|
|
285
289
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
// // TODO later if enabled there is problem when admin delete a bot image
|
|
291
|
+
// // if (path.indexOf("/"+req.user.id+"/")==-1) {
|
|
292
|
+
// // winston.warn('Permission denied to delete image:'+path);
|
|
293
|
+
// // return res.status(403).send({success: false, msg: 'Permission denied to delete image:'+path});
|
|
294
|
+
// // }
|
|
291
295
|
|
|
292
|
-
|
|
293
|
-
|
|
296
|
+
// let filename = pathlib.basename(path);
|
|
297
|
+
// winston.debug("filename:"+filename);
|
|
294
298
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
+
// if (!filename) {
|
|
300
|
+
// winston.warn('Error delete image. No filename specified:'+path);
|
|
301
|
+
// return res.status(500).send({success: false, msg: 'Error delete image. No filename specified:'+path});
|
|
302
|
+
// }
|
|
299
303
|
|
|
300
304
|
|
|
301
305
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
});
|
|
306
|
+
// fileService.deleteFile(path).then(function(data) {
|
|
307
|
+
|
|
308
|
+
// let thumbFilename = 'thumbnails_200_200-'+filename;
|
|
309
|
+
// winston.debug("thumbFilename:"+thumbFilename);
|
|
310
|
+
|
|
311
|
+
// let thumbPath = path.replace(filename,thumbFilename);
|
|
312
|
+
// winston.debug("thumbPath:"+thumbPath);
|
|
313
|
+
|
|
314
|
+
// fileService.deleteFile(thumbPath).then(function(data) {
|
|
315
|
+
// winston.debug("thumbFilename deleted:"+thumbPath);
|
|
316
|
+
// }).catch(function(error) {
|
|
317
|
+
// winston.error('Error deleting thumbnail image.',error);
|
|
318
|
+
// });
|
|
319
|
+
|
|
320
|
+
// return res.status(200).json({
|
|
321
|
+
// message: 'Image deleted successfully',
|
|
322
|
+
// filename: encodeURIComponent(data.filename)
|
|
323
|
+
// });
|
|
324
|
+
// }).catch(function(error) {
|
|
325
|
+
// winston.error('Error deleting image.',error);
|
|
326
|
+
// return res.status(500).send({success: false, msg: 'Error deleting image.'});
|
|
327
|
+
// });
|
|
328
|
+
|
|
329
|
+
// } catch (error) {
|
|
330
|
+
// winston.error('Error deleting image.',error);
|
|
331
|
+
// return res.status(500).send({success: false, msg: 'Error deleting image.'});
|
|
332
|
+
// }
|
|
333
|
+
// });
|
|
330
334
|
|
|
331
335
|
|
|
332
336
|
/*
|
|
@@ -397,42 +401,43 @@ curl -v -X POST -H 'Content-Type: multipart/form-data' -F "file=@/Users/andreale
|
|
|
397
401
|
curl -v -X POST -H 'Content-Type: multipart/form-data' -F "file=@/Users/andrealeo/dev/chat21/tiledesk-server-dev-org/test.jpg" https://tiledesk-server-pre.herokuapp.com/images/public/
|
|
398
402
|
*/
|
|
399
403
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
404
|
+
// DEPRECATED FROM VERSION 2.14.24
|
|
405
|
+
// router.post('/public', upload.single('file'), (req, res, next) => {
|
|
406
|
+
// try {
|
|
407
|
+
// winston.debug("req",req);
|
|
408
|
+
// var folder = req.folder || "error";
|
|
409
|
+
// winston.debug("folder",folder);
|
|
405
410
|
|
|
406
|
-
|
|
407
|
-
|
|
411
|
+
// var destinationFolder = "uploads/public/images/" + folder +"/";
|
|
412
|
+
// winston.debug("destinationFolder",destinationFolder);
|
|
408
413
|
|
|
409
|
-
|
|
414
|
+
// winston.debug("req.file.filename",req.file.filename);
|
|
410
415
|
|
|
411
|
-
|
|
416
|
+
// var thumFilename = destinationFolder+'thumbnails_200_200-' + req.file.originalname;
|
|
412
417
|
|
|
413
418
|
|
|
414
|
-
|
|
419
|
+
// fileService.getFileDataAsBuffer(req.file.filename).then(function(buffer) {
|
|
415
420
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
421
|
+
// sharp(buffer).resize(200, 200).toBuffer((err, resizeImage, info) => {
|
|
422
|
+
// if (err) { winston.error("Error generating thumbnail", err); }
|
|
423
|
+
// fileService.createFile ( thumFilename, resizeImage, undefined, undefined);
|
|
424
|
+
// });
|
|
420
425
|
|
|
421
426
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
427
|
+
// return res.status(201).json({
|
|
428
|
+
// message: 'Image uploded successfully',
|
|
429
|
+
// filename: encodeURIComponent(req.file.filename),
|
|
430
|
+
// thumbnail: encodeURIComponent(thumFilename)
|
|
431
|
+
// });
|
|
432
|
+
// });
|
|
428
433
|
|
|
429
434
|
|
|
430
435
|
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
});
|
|
436
|
+
// } catch (error) {
|
|
437
|
+
// winston.error('Error deleting public image.',error);
|
|
438
|
+
// return res.status(500).send({success: false, msg: 'Error deleting public image.'});
|
|
439
|
+
// }
|
|
440
|
+
// });
|
|
436
441
|
|
|
437
442
|
|
|
438
443
|
// router.use('/uploads', express.static(path.join(__dirname, '/uploads')));
|