mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 06:30:53 +03:00
use TransformStream if available
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import Keychain from './keychain';
|
||||
import { downloadStream } from './api';
|
||||
import { transform } from './streams';
|
||||
import { transformStream } from './streams';
|
||||
import contentDisposition from 'content-disposition';
|
||||
|
||||
let noSave = false;
|
||||
@@ -24,7 +24,7 @@ async function decryptStream(request) {
|
||||
|
||||
const body = await file.download.result;
|
||||
|
||||
const readStream = transform(body, {
|
||||
const readStream = transformStream(body, {
|
||||
transform: (chunk, controller) => {
|
||||
file.progress += chunk.length;
|
||||
controller.enqueue(chunk);
|
||||
|
||||
Reference in New Issue
Block a user