Home Posts GitHub Menu

Vue Upload Files Examples

All files contain the following meta data:


For reference and to key in loops.


Reference to raw file object from browser.


The instance of the named upload object.


A raw base64 format for the data useful for image previews. Note that it will be null until the files preview() method is called since it can take a while to load up.


The name of the file.


The size of the file.


The mime type of the file.


Extension of the file from filename then mimetype based on what is available.


Current state of the file. Could be one of the following: queue, progress, upload, error or success.


Percent progress indicator for the file as an integer (0 to 100);


Errors from file.

Note that errors can come internally from the module itself or externally from an error on the server end.

Use parseErrors option when installing the plugin to format errors from the server.

The internal default format is: [{code: 'somecode', msg: 'There was an error.''}]


Function to generate a raw format of the file useful for image previews.


Completely removes the file from the queue.