develop #2
@@ -14,9 +14,6 @@ export async function sendBlobFileUpload({ file, opts }: BlobFileUpload): Promis
|
|||||||
if (!file) throw new Error("No file supplied");
|
if (!file) throw new Error("No file supplied");
|
||||||
if (!opts?.uploadUrl) throw new Error("No URL supplied");
|
if (!opts?.uploadUrl) throw new Error("No URL supplied");
|
||||||
|
|
||||||
if (file?.type !== "text/csv") {
|
|
||||||
throw new Error("This file is not supported, please upload a CSV file.");
|
|
||||||
}
|
|
||||||
const timeoutMs = opts?.timeoutMs ?? 30000;
|
const timeoutMs = opts?.timeoutMs ?? 30000;
|
||||||
const fieldName = opts?.fieldName ?? "upload";
|
const fieldName = opts?.fieldName ?? "upload";
|
||||||
const fileName = opts?.overrideFileName ?? file?.name;
|
const fileName = opts?.overrideFileName ?? file?.name;
|
||||||
|
|||||||
Reference in New Issue
Block a user