@files-ui/core
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -12,5 +12,15 @@ import { ExtFile, Method } from "../types"; | ||
*/ | ||
export declare const uploadBlob: (xhr: XMLHttpRequest, method: Method | undefined, endpoint: string, data: File, headers: Record<string, string> | undefined) => Promise<ServerResponse>; | ||
/** | ||
* Uploads one formData object to a given endpoint in a promisified way | ||
* @param xhr XMLHTTPrequest object | ||
* @param method method for uploading | ||
* @param endpoint endpoint to upload the file | ||
* @param data FromData object to perform multipart form data upload | ||
* @param headers the set of headers | ||
* @returns a server response that consists on {status, payload, message} | ||
*/ | ||
export declare const uploadFormData: (xhr: XMLHttpRequest, method: Method | undefined, endpoint: string, data: FormData, headers: Record<string, string> | undefined) => Promise<ServerResponse>; | ||
/** | ||
* | ||
* Method that perfomrs the upload operation for an ExtFIle | ||
* @param file the extended file to be uploaded | ||
@@ -21,5 +31,6 @@ * @param url the endpoint | ||
* @param headers headers for request | ||
* @returns | ||
* @param asBlob if true, it wil upload file as blob instead of uploadint it as FormData. | ||
* @returns The extFile with upload values modified | ||
*/ | ||
export declare const uploadExtFile: (extFile: ExtFile, url?: string, urlFromExtFile?: (f: ExtFile) => string, method?: Method, headers?: Record<string, string>, uploadLabel?: string) => Promise<ExtFile>; | ||
export declare const uploadExtFile: (extFile: ExtFile, url?: string, urlFromExtFile?: (f: ExtFile) => string, method?: Method, headers?: Record<string, string>, uploadLabel?: string, asBlob?: boolean) => Promise<ExtFile>; | ||
export declare function uploadFile(file: File, url: string, method?: Method, label?: string, headers?: Record<string, string>): Promise<ServerResponse>; | ||
@@ -26,0 +37,0 @@ /** |
{ | ||
"name": "@files-ui/core", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Base code for Files UI", | ||
@@ -5,0 +5,0 @@ "main": "./build/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
939677
9643