Implementing file uploads

In the card modal window, once a user clicks the Attachment button, the native file manager window will show up. Once the user selects a file, the frontend will send that file to the server and receive the saved file's information.

There are two parts to implementing this file upload feature. One is that we need to build a consistent UI of the Attachment button. By default, the UI of the element <input type="file" /> looks different in Chrome, Firefox, Safari, and IE, which is the only HTML element that will trigger the opening of the native file manager window. The second one is to send the file. Within <form>, we can add the file input to send the selected file when the form is submitted. However, in our card modal ...

Get Building Applications with Spring 5 and Vue.js 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.