View Code? Open in Web Editor
NEW
Handle file uploads to different storage services like Amazon S3, Google Cloud or etc. It also supports different type of ORM adapters, like Prisma.
Home Page: https://uplo.js.org
License: MIT License
uplo's People
Contributors
uplo's Issues
This might be useful if we want to backup blobs to separate service. For example: run background job to copy Blob to Glacier after file attached to S3.
Looks super interesting, thanks for open sourcing, any plans on supporting react via @uplo/react or something similar? Thank you!
This might be useful if we change services (for example from GCP to S3) and we want to move blobs
I've tried using it on Vercel edge runtime, but it fails since it uses tempy
and other node-specific libs. Would be nice to run it on edge functions.
Hi !
I don't know if i'm doing something wrong but in Bun I do :
await uplo . attachments . user ( user . id ) . avatar . attachFile ( {
fileName : file . name ,
content : Buffer . from ( await file . arrayBuffer ( ) ) ,
contentType : file . type
} )
The problem is:
Buffer.from(await file.arrayBuffer()) instanceof Uint8Array
returns true
So it throws because of this:
} else if ( content instanceof Uint8Array ) {
throw new Error ( "Uint8Array not implemented" ) ;
}
If I comment it, the file is uploaded properly tho, is there any reason you can't send a Buffer to GCS ?