mirror of
https://github.com/mito-systems/ranger-app.git
synced 2026-03-03 19:54:07 +00:00
use blob for mobile
This commit is contained in:
parent
aedeb63d13
commit
2520ad601d
@ -17,9 +17,9 @@ export async function uploadToIpfs(imageBuffer: Buffer, filename: string): Promi
|
||||
|
||||
const formData = new FormData()
|
||||
|
||||
// Create file from buffer
|
||||
const file = new File([imageBuffer], filename, { type: 'image/jpeg' })
|
||||
formData.append('file', file)
|
||||
// Create file from buffer using Blob
|
||||
const blob = new Blob([imageBuffer], { type: 'image/jpeg' })
|
||||
formData.append('file', blob, filename)
|
||||
|
||||
// Add metadata
|
||||
const pinataMetadata = JSON.stringify({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user