Merge branch 'main' of github.com:koush/scrypted

This commit is contained in:
Koushik Dutta
2024-10-03 09:11:39 -07:00

View File

@@ -59,6 +59,7 @@ export class BufferHost extends ScryptedDeviceBase implements HttpRequestHandler
const filename = uuid + (extension ? `.${extension}` : '');
this.hosted.set(`/${filename}`, { data: buffer, fromMimeType, toMimeType });
setTimeout(() => this.hosted.delete(`/${filename}`), 10 * 60 * 1000); // free this resource after 10 min.
return Buffer.from(`${endpoint}${filename}`);
}