@files-ui/core
Advanced tools
@@ -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 @@ /** |
+1
-1
| { | ||
| "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 too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
939677
2.03%9643
1.61%