quasar-ui-danx 0.3.41 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -105,7 +105,9 @@ async function saveFilesLocally(files) {
|
|
105
105
|
} else {
|
106
106
|
fileName += "." + (file.mime || file.type).split("/").pop() || "jpg";
|
107
107
|
}
|
108
|
+
console.log("downloading ", fileName);
|
108
109
|
await downloadFile(file.blobUrl, fileName);
|
110
|
+
console.log("downloaded");
|
109
111
|
}
|
110
112
|
}
|
111
113
|
</script>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { uid } from "quasar";
|
2
2
|
import { danxOptions } from "../config";
|
3
|
+
import { sleep } from "../helpers";
|
3
4
|
import { resolveFileLocation } from "./files";
|
4
5
|
import { FlashMessages } from "./FlashMessages";
|
5
6
|
|
@@ -277,7 +278,16 @@ export class FileUpload {
|
|
277
278
|
console.log("calling presigned URL", presignedUrl);
|
278
279
|
|
279
280
|
// Fetch presigned upload URL
|
280
|
-
|
281
|
+
let fileResource;
|
282
|
+
|
283
|
+
try {
|
284
|
+
fileResource = await fetch(presignedUrl).then(r => r.json());
|
285
|
+
} catch (error) {
|
286
|
+
console.log("First upload attempt failed. waiting and trying again:", error);
|
287
|
+
await sleep(3000);
|
288
|
+
console.log("upload attempt 2...");
|
289
|
+
fileResource = await fetch(presignedUrl).then(r => r.json());
|
290
|
+
}
|
281
291
|
|
282
292
|
console.log("loaded presignedUrl: fileResource", fileResource);
|
283
293
|
|