How to use Vue file upload vue-simple-upload

Source: Internet
Author: User

Extremely scary, when using the Vue-simple-upload plugin to do file upload, encountered always access to the background of the interface.

I thought I use plug-ins have problems, various changes, because unfamiliar, false change several times.

Emmmm~~ originally is my action parameter to the lowercase post, start console error, gave so obvious hint,

I can't believe I don't understand.

OK, first step, download

NPM Install Vue-simple-uploader--save

The second step is to guide the build to be used:

import FileUpload from ' Vue-simple-upload/dist/fileupload ' the third step, then define the following: Components : { FileUpload Step Fourth, using: <file-upload class= "UploadFile" target= "My url" action= "POST" > </ File-upload> Basic use is this, but I will not modify the style, will modify the style of the small partner, let me know, thank you ~ by Cool Dog

How to use Vue file upload vue-simple-upload

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.