Skip to content

Commit 20e6c62

Browse files
committed
Multi genbank/fasta import
1 parent a3b08f0 commit 20e6c62

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### 1.X - 2026-X
2+
- Allow `file` to be an array for `IImportDataOptions`
3+
14
### 1.51.5 - 2026-06-22
25
- Pass `auditUserComment` option to `Storage.deleteStorageItem` for attaching a reason to the audit log record
36

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.51.5",
3+
"version": "1.51.6-fb-genBank.1",
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: 9 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,14 @@ 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+
// Multiple files are sent as repeated "file" parts; the server reads them via getMultiFileMap.
172+
options.file.forEach(f => {
173+
if (f instanceof File) {
174+
form.append('file', f);
175+
}
176+
});
177+
} else if (options.file instanceof File) {
171178
form.append('file', options.file);
172179
} else if (options.file.tagName == 'INPUT' && options.file.files.length > 0) {
173180
form.append('file', options.file.files[0]);

0 commit comments

Comments
 (0)