我应该如何将从pouchdb检索到的base64图像字符串作为文件上传到另一个api?

时间:2021-06-01 07:06:52

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

我有一个存储在pouchdb中的base64图像格式,现在我希望在服务器中的特定API上传相同的文件。

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

我如何从base64image中获取文件路径或文件,因为API只接受文件?

1 个解决方案

#1


1  

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.

你可能正在寻找blob-util。您可以使用PouchDB的附件API将Blob从数据库中取出(getAttachment()),然后使用blob-util将这些Blob转换为各种不同的格式。

#1


1  

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.

你可能正在寻找blob-util。您可以使用PouchDB的附件API将Blob从数据库中取出(getAttachment()),然后使用blob-util将这些Blob转换为各种不同的格式。