MunifTanjim / node-bitbucket

Bitbucket API client for Browser and Node.js
https://bitbucketjs.netlify.app
MIT License
105 stars 31 forks source link

How to pass files as string in createFileCommit method #115

Open ayush04 opened 2 years ago

ayush04 commented 2 years ago

I have a react client from where a user can drag and drop some files. I am sending those files to a node app from where I want to commit those files to Bitbucket repo. I am using multer to get the files in node.

My problem is, I am not sure how to pass these files to BitBucket. The documentation here says the files parameter should be a string. Can someone please provide an example as to how convert a file to a string? Is it the content that should be converted? If so, how to pass the filename?