Skip to content

Commit

Permalink
feat(entry-file): added file upload source
Browse files Browse the repository at this point in the history
  • Loading branch information
egordidenko committed Aug 28, 2024
1 parent b410122 commit ac4497d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions abstract/UploaderPublicApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export class UploaderPublicApi {
isRemoved: status === 'removed',
errors: /** @type {import('../types/exported.js').OutputFileEntry['errors']} */ (uploadEntryData.errors),
status,
source: uploadEntryData?.source,
};

return /** @type {import('../types/exported.js').OutputFileEntry<TStatus>} */ (outputItem);
Expand Down
1 change: 1 addition & 0 deletions abstract/uploadEntrySchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { UploadcareFile } from '@uploadcare/upload-client';
* @property {string | null} fullPath
* @property {import('@uploadcare/upload-client').Metadata | null} metadata
* @property {boolean} isRemoved
* @property {String} source
*/

/**
Expand Down
1 change: 1 addition & 0 deletions blocks/FileItem/FileItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ export class FileItem extends UploaderBlock {
cdnUrl: entry.getValue('cdnUrl') ?? fileInfo.cdnUrl,
cdnUrlModifiers: entry.getValue('cdnUrlModifiers') ?? '',
uploadProgress: 100,
source: entry.getValue('source'),
});

if (entry === this._entry) {
Expand Down

0 comments on commit ac4497d

Please sign in to comment.