@runnerpro/backend 1.12.11 → 1.12.12
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.
|
@@ -173,12 +173,12 @@ const getConversationThumbnail = (req, res, { bucket, isClient }) => __awaiter(v
|
|
|
173
173
|
if (!file)
|
|
174
174
|
return res.status(404).send('Not found');
|
|
175
175
|
const [thumbnail] = yield bucket.file(`Chat/${idVideo}-thumbnail`).download();
|
|
176
|
-
res.
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
res.setHeader('Cache-Control', 'public, max-age=31536000');
|
|
177
|
+
res.setHeader('Expires', new Date(Date.now() + 31536000).toUTCString());
|
|
178
|
+
res.send({
|
|
179
|
+
file: thumbnail.toString('base64'),
|
|
180
|
+
mimetype: 'image/jpeg',
|
|
180
181
|
});
|
|
181
|
-
res.end(thumbnail);
|
|
182
182
|
});
|
|
183
183
|
const getConversationFile = (req, res, { bucket, isClient }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
184
184
|
const result = yield getChatFile({
|