mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 14:40:55 +03:00
implemented download tokens
This commit is contained in:
@@ -2,12 +2,13 @@ import assert from 'assert';
|
||||
import Archive from '../../../app/archive';
|
||||
import FileSender from '../../../app/fileSender';
|
||||
import FileReceiver from '../../../app/fileReceiver';
|
||||
import storage from '../../../app/storage';
|
||||
|
||||
const headless = /Headless/.test(navigator.userAgent);
|
||||
// TODO: save on headless doesn't work as it used to since it now
|
||||
// follows a link instead of fetch. Maybe there's a way to make it
|
||||
// work? For now always set noSave.
|
||||
const options = { noSave: true || !headless, stream: true }; // only run the saveFile code if headless
|
||||
const options = { noSave: true || !headless, stream: true, storage }; // only run the saveFile code if headless
|
||||
|
||||
// FileSender uses a File in real life but a Blob works for testing
|
||||
const blob = new Blob([new ArrayBuffer(1024 * 128)], { type: 'text/plain' });
|
||||
|
||||
Reference in New Issue
Block a user