@runnerpro/backend 1.14.8 → 1.14.9
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.
|
@@ -201,12 +201,21 @@ const getConversationFile = (req, res, { bucket, isClient }) => __awaiter(void 0
|
|
|
201
201
|
});
|
|
202
202
|
if (!result)
|
|
203
203
|
return res.status(404).send('Not found');
|
|
204
|
-
|
|
205
|
-
'
|
|
206
|
-
'
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
204
|
+
if (result.message.mimetype.includes('video')) {
|
|
205
|
+
res.setHeader('Cache-Control', 'public, max-age=604800');
|
|
206
|
+
res.setHeader('Expires', new Date(Date.now() + 604800000).toUTCString());
|
|
207
|
+
res.send({
|
|
208
|
+
video: result.file.toString('base64'),
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
res.writeHead(200, {
|
|
213
|
+
'Content-Type': result.message.text,
|
|
214
|
+
'Content-disposition': 'inline',
|
|
215
|
+
'Content-Length': result.file.length,
|
|
216
|
+
});
|
|
217
|
+
res.end(result.file);
|
|
218
|
+
}
|
|
210
219
|
});
|
|
211
220
|
const getChatFile = ({ bucket, id, isClient, userid }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
212
221
|
const idBBDD = id.includes('-original') ? id.replace('-original', '') : id;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SA0BpD,CAAC;
|
|
1
|
+
{"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../../../../src/chat/api/conversation.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,iBAAiB,0BAA2B,GAAG,SA0BpD,CAAC;AA4fF,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|