mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-08 23:18:39 +03:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7013f5cf80 | ||
|
|
6184a70ba4 | ||
|
|
e264d0da62 | ||
|
|
23a6e338e8 | ||
|
|
2c1dfdbe07 | ||
|
|
994e77a38b |
@@ -162,8 +162,8 @@ function download(id, keychain, onprogress, canceller) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
xhr.addEventListener('progress', function(event) {
|
xhr.addEventListener('progress', function(event) {
|
||||||
if (event.lengthComputable && event.target.status === 200) {
|
if (event.target.status === 200) {
|
||||||
onprogress([event.loaded, event.total]);
|
onprogress(event.loaded);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const auth = await keychain.authHeader();
|
const auth = await keychain.authHeader();
|
||||||
@@ -171,7 +171,7 @@ function download(id, keychain, onprogress, canceller) {
|
|||||||
xhr.setRequestHeader('Authorization', auth);
|
xhr.setRequestHeader('Authorization', auth);
|
||||||
xhr.responseType = 'blob';
|
xhr.responseType = 'blob';
|
||||||
xhr.send();
|
xhr.send();
|
||||||
onprogress([0, 1]);
|
onprogress(0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default class FileReceiver extends Nanobus {
|
|||||||
this.fileInfo.name = meta.name;
|
this.fileInfo.name = meta.name;
|
||||||
this.fileInfo.type = meta.type;
|
this.fileInfo.type = meta.type;
|
||||||
this.fileInfo.iv = meta.iv;
|
this.fileInfo.iv = meta.iv;
|
||||||
this.fileInfo.size = meta.size;
|
this.fileInfo.size = +meta.size;
|
||||||
this.state = 'ready';
|
this.state = 'ready';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ export default class FileReceiver extends Nanobus {
|
|||||||
this.fileInfo.id,
|
this.fileInfo.id,
|
||||||
this.keychain,
|
this.keychain,
|
||||||
p => {
|
p => {
|
||||||
this.progress = p;
|
this.progress = [p, this.fileInfo.size];
|
||||||
this.emit('progress');
|
this.emit('progress');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "firefox-send",
|
"name": "firefox-send",
|
||||||
"version": "2.6.0",
|
"version": "2.6.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "firefox-send",
|
"name": "firefox-send",
|
||||||
"description": "File Sharing Experiment",
|
"description": "File Sharing Experiment",
|
||||||
"version": "2.6.0",
|
"version": "2.6.1",
|
||||||
"author": "Mozilla (https://mozilla.org)",
|
"author": "Mozilla (https://mozilla.org)",
|
||||||
"repository": "mozilla/send",
|
"repository": "mozilla/send",
|
||||||
"homepage": "https://github.com/mozilla/send/",
|
"homepage": "https://github.com/mozilla/send/",
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ deletePopupYes = Sim
|
|||||||
deletePopupCancel = Cancelar
|
deletePopupCancel = Cancelar
|
||||||
deleteButtonHover = Apagar
|
deleteButtonHover = Apagar
|
||||||
copyUrlHover = Copiar URL
|
copyUrlHover = Copiar URL
|
||||||
footerLinkLegal = Legal
|
footerLinkLegal = Informações legais
|
||||||
# Test Pilot is a proper name and should not be localized.
|
# Test Pilot is a proper name and should not be localized.
|
||||||
footerLinkAbout = Acerca do Test Pilot
|
footerLinkAbout = Acerca do Test Pilot
|
||||||
footerLinkPrivacy = Privacidade
|
footerLinkPrivacy = Privacidade
|
||||||
|
|||||||
4
public/locales/sn/send.ftl
Normal file
4
public/locales/sn/send.ftl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Firefox Send is a brand name and should not be localized.
|
||||||
|
title = Firefox Send
|
||||||
|
siteFeedback = Zvirikutaurwa
|
||||||
|
uploadPageLearnMore = Dzidza zvimwe
|
||||||
@@ -6,13 +6,6 @@ module.exports = async function(req, res) {
|
|||||||
const id = req.params.id;
|
const id = req.params.id;
|
||||||
try {
|
try {
|
||||||
const meta = req.meta;
|
const meta = req.meta;
|
||||||
const contentLength = await storage.length(id);
|
|
||||||
res.writeHead(200, {
|
|
||||||
'Content-Disposition': 'attachment',
|
|
||||||
'Content-Type': 'application/octet-stream',
|
|
||||||
'Content-Length': contentLength,
|
|
||||||
'WWW-Authenticate': `send-v1 ${req.nonce}`
|
|
||||||
});
|
|
||||||
const file_stream = storage.get(id);
|
const file_stream = storage.get(id);
|
||||||
let cancelled = false;
|
let cancelled = false;
|
||||||
|
|
||||||
@@ -21,7 +14,7 @@ module.exports = async function(req, res) {
|
|||||||
file_stream.destroy();
|
file_stream.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
file_stream.on('end', async () => {
|
file_stream.pipe(res).on('finish', async () => {
|
||||||
if (cancelled) {
|
if (cancelled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -38,8 +31,6 @@ module.exports = async function(req, res) {
|
|||||||
log.info('StorageError:', id);
|
log.info('StorageError:', id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
file_stream.pipe(res);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
res.sendStatus(404);
|
res.sendStatus(404);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class GCSStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getStream(id) {
|
getStream(id) {
|
||||||
return this.bucket.file(id).createReadStream();
|
return this.bucket.file(id).createReadStream({ validation: false });
|
||||||
}
|
}
|
||||||
|
|
||||||
set(id, file) {
|
set(id, file) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
selenium==3.14.1
|
selenium==3.141.0
|
||||||
flake8==3.6.0
|
flake8==3.6.0
|
||||||
flake8-isort==2.5
|
flake8-isort==2.5
|
||||||
PyPOM==2.2.0
|
PyPOM==2.2.0
|
||||||
pytest==3.9.3
|
pytest==3.10.0
|
||||||
pytest-html==1.19.0
|
pytest-html==1.19.0
|
||||||
pytest-selenium==1.14.0
|
pytest-selenium==1.14.0
|
||||||
pytest-xdist==1.23.2
|
pytest-xdist==1.24.0
|
||||||
|
|||||||
Reference in New Issue
Block a user