@brightkyefoo/form-data
Version:
Extension de FormData pour ajouter JSON stringifié si nécessaire
12 lines (11 loc) • 446 B
TypeScript
export default class BrightFormData extends FormData {
append(name: string, value: any): void;
get(name: string): FormDataEntryValue | null;
set(name: string, value: any): void;
/**
* This method help appending multiple files as an array to the key name specified
* @param name is the name of the key you want to append
* @param files is an array of files
*/
addFiles(name: string, files: File[]): void;
}