Uploading zip from a base64 string
Hello, when i try to upload a base64 zip in NodeJS
File uploaded without extension(zip)
const encodedFileNAme = `data:application/zip;base64,${content}`;
const file = await Cloudinary.uploader.upload(encodedFileNAme, { use_filename: true, resource_type: 'raw'}, (err, res) => {
return res;
});
What I do wrong?
2
-
Hi,
You can add the `format` parameter with the extension like this:
{resource_type:"raw",format:"zip"}
Another option is to add the `public_id` parameter with the file name including the extension:
{resource_type:"raw",public_id:"myName.zip"}
Best,
Michal
1
Post is closed for comments.
Comments
1 comment