mirror of
https://github.com/nextcloud/passman.git
synced 2025-12-19 06:30:01 +08:00
catch error on importing custom field files
Signed-off-by: binsky <timo@binsky.org>
This commit is contained in:
parent
9c6e270f76
commit
452c1cc964
1 changed files with 8 additions and 4 deletions
|
|
@ -66,10 +66,14 @@ var PassmanImporter = PassmanImporter || {};
|
||||||
mimetype: customFields[cf].value.mimetype,
|
mimetype: customFields[cf].value.mimetype,
|
||||||
data: customFields[cf].value.file_data
|
data: customFields[cf].value.file_data
|
||||||
};
|
};
|
||||||
var file_result = await FileService.uploadFile(_file);
|
try {
|
||||||
delete file_result.file_data;
|
var file_result = await FileService.uploadFile(_file);
|
||||||
file_result.filename = EncryptService.decryptString(file_result.filename);
|
delete file_result.file_data;
|
||||||
customFields[cf].value = file_result;
|
file_result.filename = EncryptService.decryptString(file_result.filename);
|
||||||
|
customFields[cf].value = file_result;
|
||||||
|
} catch (e) {
|
||||||
|
console.error("failed processing custom field file: " + _file.filename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
credential.custom_fields.push(
|
credential.custom_fields.push(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue