File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -69,32 +69,6 @@ export default function (
6969 }
7070 }
7171
72- // let key: keyof typeof uploadOptions;
73- // for (key in uploadOptions) {
74- // if (key) {
75- // if (key == "file" && typeof uploadOptions.file != "string") {
76- // formData.file = {
77- // value: uploadOptions.file,
78- // options: {
79- // filename: uploadOptions.fileName,
80- // contentType: null,
81- // },
82- // };
83- // } else if (key == "tags" && Array.isArray(uploadOptions.tags)) {
84- // formData.tags = uploadOptions.tags.join(",");
85- // }
86- // else if(key == "extensions" && Array.isArray(uploadOptions.extensions)){
87- // formData.extensions = JSON.stringify(uploadOptions.extensions);
88- // } else if (key === "customMetadata" && typeof uploadOptions.customMetadata === "object" &&
89- // !Array.isArray(uploadOptions.customMetadata) && uploadOptions.customMetadata !== null) {
90- // formData.customMetadata = JSON.stringify(uploadOptions.customMetadata)
91- // }
92- // else {
93- // formData[key] = String(uploadOptions[key]);
94- // }
95- // }
96- // }
97-
9872 var requestOptions = {
9973 url : defaultOptions . uploadEndpoint || "https://upload.imagekit.io/api/v1/files/upload" ,
10074 method : "POST" ,
You can’t perform that action at this time.
0 commit comments