We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0896fad commit d39871fCopy full SHA for d39871f
1 file changed
src/utilities/loadFilesFromURLs.ts
@@ -5,7 +5,12 @@ export function loadFilesFromURLs(urls: string[]): Promise<File[]> {
5
fetch(url)
6
.then((response) => response.arrayBuffer())
7
.then((data) => {
8
- return new File([data], getFileNameFromURL(url));
+ let name = getFileNameFromURL(url);
9
+ const hasExtension = name && name.indexOf('.') !== -1;
10
+ if (!hasExtension) {
11
+ name = `${name}.zip`;
12
+ }
13
+ return new File([data], name);
14
}),
15
);
16
0 commit comments