Skip to content
Discussion options

You must be logged in to vote

to understand your use-case properly. You want to use same route for both uploading image and some form data. right?

If you want to use same route for uploading image along with some form field you should do the following:

  1. disable autoprocessing. https://adonisjs.com/docs/4.1/file-uploads#_disable_auto_processing
  2. follow this method to get the stream and pass the stream to S3. https://adonisjs.com/docs/4.1/file-uploads#_process_the_stream
  3. Now if you use processManually, adonis will not be able to parse the information (AFAIK), so to get the fields data you need to do the following:
const fields = new Map(); // it will contain all the fields value
await request.multipart.field((name, valu…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
3 replies
@brandonsousa
Comment options

@faiyaz26
Comment options

@brandonsousa
Comment options

Comment options

You must be logged in to vote
5 replies
@brandonsousa
Comment options

@faiyaz26
Comment options

@brandonsousa
Comment options

@faiyaz26
Comment options

@brandonsousa
Comment options

Answer selected by brandonsousa
Comment options

You must be logged in to vote
1 reply
@brandonsousa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants