This is my nodejs codes
router.post("/uploadFileMessage", upload.single('file'), async (req, res) => {
cloudinary.v2.uploader.upload(req.file.path ,{use_filename :true, resource_type:'raw'},async function(error, result) {
if(error) return res.status(400).send(error)
return res.status(200).send(result)
})
})
The output is this
{asset_id: '32aa9529bb237b80737e872d8313221f', public_id: 'f989a1c665b42821324562654bd11daf_qxqhhj', version: 1634986874, version_id: '7a0fd2acf8d2b81aca2bfb7bace9266f', signature: '7cd17b6085fe9651fc8aaf7b43a4964d79626b5a', …}
access_mode: "public"
api_key: "993546999818549"
asset_id: "32aa9529bb237b80737e872d8313221f"
bytes: 1438293
created_at: "2021-10-23T11:01:14Z"
etag: "c736d1539c693c54f4085a44ae6e353a"
original_filename: "f989a1c665b42821324562654bd11daf"
placeholder: false
public_id: "f989a1c665b42821324562654bd11daf_qxqhhj"
resource_type: "raw"
secure_url: "https://res.cloudinary.com/duldhdjsj/raw/upload/v1634986874/f989a1c665b42821324562654bd11daf_qxqhhj"
signature: "7cd17b6085fe9651fc8aaf7b43a4964d79626b5a"
tags: []
type: "upload"
url: "http://res.cloudinary.com/duldhdjsj/raw/upload/v1634986874/f989a1c665b42821324562654bd11daf_qxqhhj"
version: 1634986874
version_id: "7a0fd2acf8d2b81aca2bfb7bace9266f"
[[Prototype]]: Object
Please help me to solve this problem while I am trying to upload the raw files to cloudinary (pptx, docx, pdf...)