GithubHelp home page GithubHelp logo

wn-loader-plugin's Introduction

Mercator Loader

Making uploading and downloading of documents/images easy for WinterCMS: Just add a component/snippet to your page and specify where you want the upload to be stored. That's it. The "dropping part" on the client side is based on Dropzone.

Installation

Use composer to install

composer require mercator/wn-loader-plugin
php artisan winter:up

Usage

Place on a CMS or Static Pages page as component or snippet respectively. There are only a few parameters to adjust for the time being:

  • Destination: Path relative to the storage directory. If the path does not exist, it will be created upon upload.
  • Accepted Exentions: Extensions (file types) allowed for upload. Format as comma-separated string, e.g. .jpg,.jpeg,.doc,.docx. Note: When the string is left empty, no restrictions apply.
  • Uplaod File Size Limit: Maximum size per individual file (in megabytes). Larger files will not be uplaoded.
  • Options: Additional Dropzone options, comma separated. See Dropzone for the list of options.

You can also modify the component's properties directly when you call the component, just assign vaues to the component's properties. For example, if you want to upload images with a maximum size of 10MB to /storgae/app/media/myUploads - and resize the images 100x100, you would use the following:

{% component 'Loader' destinationDirectory=("/app/media/myUploads") acceptedExtensions=".jpg,.jpeg,.webp,.gif,.pbm" uploadSizeLimit=10 options="resizeWidth:100, resizeHeight:100" %}

Future

  • Anonymous upload, i.e., uploaded files will be grouped by sessions

Limitations

The upload currently does not work for Apple's iOS devices. This is a known limitation/bug of the Dropzone library.

wn-loader-plugin's People

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.