Skip to content

Commit 80fb5a6

Browse files
committed
Fix useUniqueFileName boolean value
1 parent a9d3860 commit 80fb5a6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libs/upload/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ module.exports = function(uploadOptions, defaultOptions, callback) {
3333
};
3434
}
3535

36+
if(uploadOptions.tags && Array.isArray(uploadOptions.tags)) {
37+
uploadOptions.tags = uploadOptions.tags.join(",");
38+
}
39+
40+
for(key in uploadOptions) {
41+
if(key && typeof uploadOptions[key] === "boolean") {
42+
uploadOptions[key] = uploadOptions[key].toString();
43+
}
44+
}
45+
3646
var requestOptions = {
3747
url : "https://api.imagekit.io/v1/files/upload",
3848
method : "POST",

0 commit comments

Comments
 (0)