@yazan.alnughnugh/file-upload

File upload component is created to help you upload files using vuejs and ajax
5,055 57
Install
npm install @yazan.alnughnugh/file-upload
Latest Version:1.3.0
License:ISC
Last Updated:Oct 23, 2023
Links: GitHub  ·  npm
Maintainer: yazan.alnughnugh

npm npm StyleCI

Supporting Upload file component

Introduction

laravel-vue-datatable intro image

Are you looking for an easy way to upload files, this is what are you looking for.

This is a vue component for uploading files using ajax. It contain amazing features, you can use it easily without any complexity.

Features

  • Preview files before upload
  • Multi-file upload
  • Drag and Drop files
  • Upload multiple files at the same time
  • Delete/Delete all
  • Cancel/Cancel all
  • Chunk upload

Official Documentation

Documentation for File Upload can be found here here

Demo

File Upload Demo

Requirements

Installation

To install and setup the component we will follow a few steps:

step 1
npm install `@yazan.alnughnugh/file-upload
step 2

Vue 2

// app/resources/js/app.js

 Vue.component('file-upload', require('@yazan.alnughnugh/file-upload').default);

Vue 3

// app/resources/js/app.js
 import FileUpload from '@yazan.alnughnugh/file-upload';

 const app = createApp(options);

 app.component('file-upload', FileUpload);
 app.mount('#app');

Usage

To start use the component we will add a component to your blade file with three props,

url is the url where you want to send request to it,

id if you want to send model id with request,

label here you can add your description.

// resources/posts/create.blade.php

  <file-upload :url="url" :id="id" :label="label"></file-upload>

Request

The request will be the same as bellow, The files will be sent one By one , one request for each file.

// resources/posts/create.blade.php

  [
    "id" => "9", // if you added id
    "file" => File , // this is our file
  ] ;   

Configuration

Name Type Default Description
url String "/" is the url where you want to send request to it
id Number null if you want to send model id with request
label String 'PNG, JPG, GIF up to 10MB' here you can add your description

Related Packages

vue-upload-component

Vue.js file upload component, Multi-file upload, Upload directory, Drag upload,...

2,928,318 2,684
vue-upload-component-evans

Vue.js file upload component, Multi-file upload, Upload directory, Drag upload,...

1,943 2,684
@ohos-ports/vue-upload-component

Vue.js file upload component, Multi-file upload, Upload directory, Drag upload,...

134 6
vue-resumable

这是一个vue上传组件,它支持多线程、分块上传及异常重试

782 9
@waf2-0/vue-upload-component

Vue.js file upload component, Multi-file upload, Upload directory, Drag upload,...

5,240 2,684

Version History

Version Released License
1.3.0 ISC
1.1.0 ISC
1.0.10 ISC
1.0.9 ISC
1.0.8 ISC