How should I upload a base64 image string retrieved from pouchdb to another api as a file?

651 views Asked by At

I have a base64 image format stored in pouchdb, now I want the same file to upload in particular API in server.

How do I get file path or file out of base64image as the API accepts only file so?

1

There are 1 answers

0
nlawson On

You are probably looking for blob-util. You can use PouchDB's attachment API to get Blobs out of the database (getAttachment()), and then use blob-util to convert those Blobs to a variety of different formats.