Skip to content
Discussion options

You must be logged in to vote

The way i achieve this currently is to use the local file path of the uploaded image:

const image = ctx.request.file(...)
const resizedImageData = await sharp(image.tmpPath).resize(500).toBuffer()

I've tried digging through the @adonisjs/bodyparser package which allows streaming uploaded files directly (without saving to local filesystem before). Unfortunately i didn't try this yet.

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@HappyLDE
Comment options

@alexhenriquepv
Comment options

Answer selected by HappyLDE
Comment options

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

@yarapolana
Comment options

@thetutlage
Comment options

@alexhenriquepv
Comment options

@yarapolana
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
7 participants