8000 docs: add jsdoc for useUpload · nuxt-hub/core@3f66ac0 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 3f66ac0

Browse files
committed
docs: add jsdoc for useUpload
1 parent c092ede commit 3f66ac0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/runtime/blob/app/composables/useUpload.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ interface UploadOptions extends FetchOptions {
1616
multiple?: boolean
1717
}
1818

19+
/**
20+
* Upload a file or files to the server using FormData.
21+
* @param apiBase the base URL of the API to handle the upload.
22+
* @param options the options to use for the upload.
23+
* @see https://hub.nuxt.com/docs/storage/blob#useupload
24+
*/
1925
export function useUpload(apiBase: string, options?: UploadOptions & { multiple: false }): (data: FileList | HTMLInputElement | File[] | File) => Promise<BlobObject>
2026
export function useUpload(apiBase: string, options?: UploadOptions): ((data: File) => Promise<BlobObject>) & ((data: FileList | HTMLInputElement | File[]) => Promise<BlobObject[]>)
2127
export function useUpload(apiBase: string, options: UploadOptions = {}) {

0 commit comments

Comments
 (0)
0