[Vuejs]-VueJS/AdonisJs image upload and usage

0đź‘Ť

There’s multiple way to get this image accessible via the browser.

  1. You create a route within Adonis to handle a “media” route (like ~/media/1500586654324.jpg). This route will take the image ID and send the correspondant image inside your storage folder.

  2. You don’t upload your image to your storage folder and instead put them directly into the public folder of your application that means you can access the image directly via its URL.

I prefer using the first option since my public directory is 100% generated via script.

Leave a comment