Giter VIP home page Giter VIP logo

file-upload's Introduction

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 i @yazan.alnughnugh/file-upload

step 2

// app/resources/js/app.js

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

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

file-upload's People

Contributors

yazan-alnugnugh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.