Skip to content

Commit

Permalink
chore(storage): remove File type from uploadInput type (#12190)
Browse files Browse the repository at this point in the history
* (chore): remove file type from input in uploadData api
  • Loading branch information
Venkata Ramyasri Kota authored Oct 5, 2023
1 parent a1ea0f2 commit 1d85da5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/storage/src/providers/s3/apis/uploadData/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import { getMultipartUploadHandlers } from './multipart';
*
* @example
* ```ts
* // Upload a file to s3 bucket
* await uploadData({ key, data: file, options: {
* // Upload data to s3 bucket
* await uploadData({ key, data, options: {
* onProgress, // Optional progress callback.
* } }).result;
* ```
* @example
* ```ts
* // Cancel a task
* const uploadTask = uploadData({ key, data: file });
* const uploadTask = uploadData({ key, data });
* //...
* uploadTask.cancel();
* try {
Expand All @@ -49,7 +49,7 @@ import { getMultipartUploadHandlers } from './multipart';
* @example
* ```ts
* // Pause and resume a task
* const uploadTask = uploadData({ key, data: file });
* const uploadTask = uploadData({ key, data });
* //...
* uploadTask.pause();
* //...
Expand Down
2 changes: 1 addition & 1 deletion packages/storage/src/types/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ export type StorageCopyInput<
/**
* The data payload type for upload operation.
*/
export type StorageUploadDataPayload = Blob | BufferSource | string | File;
export type StorageUploadDataPayload = Blob | BufferSource | string;

0 comments on commit 1d85da5

Please sign in to comment.