Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Upload to S3 failed

default discord avatar
quandnlast year

Hi everyione, I have the payload config like bellow


let adapter = s3Adapter({


config: {


endpoint: process.env.S3_ENDPOINT,


forcePathStyle: true,


region: process.env.S3_REGION,


credentials: {


accessKeyId: process.env.S3_ACCESS_KEY_ID,


secretAccessKey: process.env.S3_SECRET_ACCESS_KEY,


},


},


bucket: process.env.S3_BUCKET,


})



export default buildConfig({


serverURL: process.env.SERVER_URL,


cors: "*",


admin: {


user: Collection.Slug.User,


},


collections: Collection.List,


globals: Single.List,


typescript: {


outputFile: path.resolve(

dirname, 'payload-types.ts'),
},
// graphQL: {
// schemaOutputFile: path.resolve(

dirname, 'generated-schema.graphql'),


// },


localization: {


locales: [


'en',


'es',


'de',


],


defaultLocale: 'en',


fallback: true,


},


plugins: [


swagger({}),


computeBlurhash(),


webp(),


formBuilder({


formSubmissionOverrides: {


access: {


admin: () => true,


}


}


}),


rbac({


collections: [Collection.Slug.User],


roles: Object.values(Role),


defaultRoles: [Role.Viewer],


}),


search({


collections: Collection.Searchable,


defaultPriorities: {


pages: 10,


posts: 20,


},


}),


cloudStorage({


collections: {


media: {


adapter,


disableLocalStorage: true,


disablePayloadAccessControl: true


},


},


}),


nestedDocs({


collections: []


}),


]


})


But when I upload the media It return fail Error: Input file is missing /src/media/file_name

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.