diff --git a/abstract/UploaderBlock.js b/abstract/UploaderBlock.js index 64a8b69d8..1ac3ed87b 100644 --- a/abstract/UploaderBlock.js +++ b/abstract/UploaderBlock.js @@ -260,6 +260,14 @@ export class UploaderBlock extends ActivityBlock { }); } + /** @param {string} internalId */ + removeFileByInternalId(internalId) { + if (!this.uploadCollection.read(internalId)) { + throw new Error(`File with internalId ${internalId} not found`); + } + this.uploadCollection.remove(internalId); + } + uploadAll = () => { const itemsToUpload = this.uploadCollection.items().filter((id) => { const entry = this.uploadCollection.read(id);