Skip to content

Commit dc1dfe1

Browse files
authored
Multi genbank/fasta files import (#220)
1 parent 843086e commit dc1dfe1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@labkey/api",
3-
"version": "1.52.1",
3+
"version": "1.52.2",
44
"description": "JavaScript client API for LabKey Server",
55
"scripts": {
66
"build": "npm run build:dist && npm run build:docs",

src/labkey/dom/Query.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export interface IImportDataOptions {
9999
auditUserComment?: string;
100100
containerPath?: string;
101101
failure?: Function;
102-
file?: File | Element | any;
102+
file?: File | File[] | Element | any;
103103
format?: string;
104104
importIdentity?: any;
105105
importLookupByAlternateKey?: boolean;
@@ -167,7 +167,13 @@ export function importData(options: IImportDataOptions): XMLHttpRequest {
167167
}
168168

169169
if (options.file) {
170-
if (options.file instanceof File) {
170+
if (Array.isArray(options.file)) {
171+
options.file.forEach(f => {
172+
if (f instanceof File) {
173+
form.append('file', f);
174+
}
175+
});
176+
} else if (options.file instanceof File) {
171177
form.append('file', options.file);
172178
} else if (options.file.tagName == 'INPUT' && options.file.files.length > 0) {
173179
form.append('file', options.file.files[0]);

0 commit comments

Comments
 (0)