aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.41k stars 2.12k forks source link

Upload images/files from NextJS API route backend #13636

Open amalhub opened 1 month ago

amalhub commented 1 month ago

Is this related to a new or existing framework?

Next.js

Is this related to a new or existing API?

Storage

Is this related to another service?

S3

Describe the feature you'd like to request

Upload images/files from the NextJS backend API route. For more information please check: https://github.com/aws-amplify/learn/issues/450#issuecomment-2245641333

Describe the solution you'd like

Currently, image upload functionality is available only from the NextJS front end. It's essential to perform it from the backend to enable proper data synchronization. Otherwise, there's no way to ensure the proper data synchronization with the database and S3 bucket. This is a very fundamental feature needed to ensure data consistency for applications.

Describe alternatives you've considered

No alternatives are found at the moment. :( Just managing the image upload from the frontend. But this sometimes results in orphan images in the S3 bucket due to data desync with the database. Please consider this feature as a high priority feature.

Additional context

No response

Is this something that you'd be interested in working on?

cwomack commented 1 month ago

@amalhub left comments on the other issues that are linked and related, but we'll mark this as a feature request for the uploadData API within Storage category to be supported for SSR usage.