Skip to content

Commit

Permalink
feat: remove depreacted addFiles method
Browse files Browse the repository at this point in the history
  • Loading branch information
nd0ut committed Jun 17, 2024
1 parent 2ed5781 commit 51f094f
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions abstract/UploaderBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,28 +162,6 @@ export class UploaderBlock extends ActivityBlock {
return this.getOutputItem(internalId);
}

/**
* @deprecated Will be removed in the near future. Please use `addFileFromObject`, `addFileFromUrl` or
* `addFileFromUuid` instead.
* @param {File[]} files
* @returns {import('../types').OutputFileEntry<'idle'>[]}
*/
addFiles(files) {
console.warn(
'`addFiles` method is deprecated. Please use `addFileFromObject`, `addFileFromUrl` or `addFileFromUuid` instead.',
);
return files.map((/** @type {File} */ file) => {
const internalId = this.uploadCollection.add({
file,
isImage: fileIsImage(file),
mimeType: file.type,
fileName: file.name,
fileSize: file.size,
});
return this.getOutputItem(internalId);
});
}

/** @param {string} internalId */
removeFileByInternalId(internalId) {
if (!this.uploadCollection.read(internalId)) {
Expand Down

0 comments on commit 51f094f

Please sign in to comment.