mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 06:30:53 +03:00
implemented download tokens
This commit is contained in:
@@ -250,7 +250,8 @@ export default function(state, emitter) {
|
||||
const start = Date.now();
|
||||
try {
|
||||
const dl = state.transfer.download({
|
||||
stream: state.capabilities.streamDownload
|
||||
stream: state.capabilities.streamDownload,
|
||||
storage: state.storage
|
||||
});
|
||||
render();
|
||||
await dl;
|
||||
@@ -269,7 +270,9 @@ export default function(state, emitter) {
|
||||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
state.transfer = null;
|
||||
const location = err.message === '404' ? '/404' : '/error';
|
||||
const location = ['404', '403'].includes(err.message)
|
||||
? '/404'
|
||||
: '/error';
|
||||
if (location === '/error') {
|
||||
state.sentry.withScope(scope => {
|
||||
scope.setExtra('duration', err.duration);
|
||||
|
||||
Reference in New Issue
Block a user