How to upload files using Vuetify's File input component

  • last month
In this video I'm showing how I'm uploading an image using Vuetify's File input component and Axios. I'm showing only the frontend part for file uploading. In the next video I will show how the image is processed on the server side.
Transcript
00:00In this video, I will show how I'm uploading images using VT5 file input.
00:17In my code I'm using this VFileInput component,
00:26which is used to select an image with these formats.
00:39And here I have a listener for the changes.
00:45When I'm selecting an image, it will notify this function.
00:56This function receives as parameter the selected image.
01:07Then I'm adding the selected image to the FormData object.
01:16And here I'm using Axios to send the FormData with image to the server.
01:27Finally, I'm showing success or error message if the image was not uploaded.
01:36In the next video, I will show how the image is saved on the server.

Recommended