mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (upload): window only issue
There is a weird window only issue: https://learn.microsoft.com/en-us/windows/win32/fileio/ maximum-file-path-limitation?tabs=registry limiting path to 260 characters that is blocking the getMetadata function from resolving
This commit is contained in:
parent
b9f2ee959d
commit
b9104626fc
1 changed files with 5 additions and 4 deletions
|
|
@ -614,10 +614,11 @@ async function processItems(itemList) {
|
||||||
if (entry === null) continue;
|
if (entry === null) continue;
|
||||||
else if (entry.isFile) {
|
else if (entry.isFile) {
|
||||||
const entrySize = await new Promise((resolve) => {
|
const entrySize = await new Promise((resolve) => {
|
||||||
if (typeof entry.getMetadata === "function") {
|
if (typeof entry.getMetadata !== "function") return resolve(-1); // eg: firefox
|
||||||
entry.getMetadata(({ size }) => resolve(size));
|
entry.getMetadata(
|
||||||
}
|
({ size }) => resolve(size),
|
||||||
else resolve(null); // eg: firefox
|
(err) => resolve(-1),
|
||||||
|
);
|
||||||
});
|
});
|
||||||
task = {
|
task = {
|
||||||
type: "file",
|
type: "file",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue