Compare commits

..

2 Commits

Author SHA1 Message Date
Derek db3940f354 Bump 2022-05-21 16:05:55 -04:00
Derek d4cd641f74 Do not read the ENTIRE file before
uploading 

No idea if this code is supposed to serve a purpose, but it breaks on 
files larger than 4GB in firefox and chrome, and the read file-as-buffer 
is never used
2022-05-21 16:05:33 -04:00
2 changed files with 42 additions and 48 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "misskey", "name": "misskey",
"version": "12.110.1+birb3", "version": "12.110.1+birb3-1",
"codename": "indigo", "codename": "indigo",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -554,8 +554,6 @@ export function upload(file: File, folder?: any, name?: string, keepOriginal: bo
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const id = Math.random().toString(); const id = Math.random().toString();
const reader = new FileReader();
reader.onload = (e) => {
const ctx = reactive({ const ctx = reactive({
id: id, id: id,
name: name || file.name || 'untitled', name: name || file.name || 'untitled',
@ -566,8 +564,6 @@ export function upload(file: File, folder?: any, name?: string, keepOriginal: bo
uploads.value.push(ctx); uploads.value.push(ctx);
console.log(keepOriginal);
const data = new FormData(); const data = new FormData();
data.append('i', $i.token); data.append('i', $i.token);
data.append('force', 'true'); data.append('force', 'true');
@ -607,8 +603,6 @@ export function upload(file: File, folder?: any, name?: string, keepOriginal: bo
}; };
xhr.send(data); xhr.send(data);
};
reader.readAsArrayBuffer(file);
}); });
} }