Node
npm i @uplo/node
import Uplo from '@uplo/node';
import PrismaAdapter from '@uplo/adapter-prisma';
import GCSService from '@uplo/service-gcs';
const config = {
privateKey: process.env.APPLICATION_SECRET, // Used to sign direct upload keys
signedIdExpiresIn: 60 * 60, // Time how long a Signed ID is valid
};
const uplo = Uplo({
config,
adapter: new PrismaAdapter({ prisma }),
services: {
s3: S3Service({
isPublic: false,
region: process.env.AWS_REGION,
bucket: process.env.AWS_BUCKET,
accessKeyId: '*****',
secretAccessKey: '*****',
}),
},
attachments: {
},
});