How to convert Buff to File Without locally saving it
How do you convert buff to a file? I have an endpoint that modifies images uploaded, and that endpoint returns buffs. Afterwards, I need these buffs to be uploaded in which I will call a service to do that, and the service I'm using requires File to upload the image.
How would I do it so that the image is not saved and just passed to the function?
1 Reply
It's not really up to you, if the
uploadImage
accepts a string that is a path to the file there's nothing you can do about it. Or does it accept a buffer as well? In which case you can simply provide that.