Code Monkey home page Code Monkey logo

silverstripe-damn-fine-uploader's Introduction

A file upload module for Silverstripe

An upload field that can be used to upload files to a Silverstripe website.

The frontend uses Uppy to handle & submit client uploads.

Features

  • a page model + controller allowing upload of one or more files to a chosen folder
  • support for userforms via an editable upload field
  • mime type validation via silverstripe/mimevalidator
  • sub resource integrity (SRI) support for generated requirements
  • thumbnail generation of uploaded images for the silverstripe/asset-admin
  • min/max image dimension verification (via Uppy)
  • configurable file size restrictions
  • restrict uploads by one or more file types
  • restrict uploads by file size

This module is not intended for use in the Silverstripe administration area, use the standard UploadField for that.

Installing

composer require codem/silverstripe-damn-fine-uploader

Use the latest version

Upload security

In the module and administration area

  • Set asset folders chosen as upload targets to be restricted (i.e no public access)
  • Verify the above by attempting to access file URLs anonymously

Generally

  • Use the public directory setup process available in more recent versions of Silverstripe
  • Ensure your web server is configured to not serve files that can be considered dangerous if they are served from an upload directory
  • Review upload fields periodically to ensure they are configured correctly

Configuration

Have a look in _config/config.yml for various configuration options and see also Default Configuration

Modify the signing_key value in your project configuration, along with anything else you like (e.g upload size limits)

The implementation entry can be used to add any configuration value supported by the field.

Fields

See fields documentation for examples.

Browser support

All the good ones. The Uppy website provides a list of supported browsers

Even though Uppy purports to support Internet Explorer, any bugs raised related to Internet Explorer will be closed.

Issues

Please add feature requests and bug reports to the Github issue tracker

Security

If you have found a security issue in this module, please email git {at} codem dot com dot au in the first instance.

License

BSD-3-Clause

Roadmap

  • File removal support in Uppy
  • Grouped uploads
  • Possible usage of the filepond library as an alternative frontend implementation

Thanks

Thanks for reading, here's a silly meme:

silverstripe-damn-fine-uploader's People

Contributors

dependabot[bot] avatar jamesdpc avatar mrjamesellis avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

silverstripe-damn-fine-uploader's Issues

Changing the language

Hi,

Is there a way to change the language(strings)? I tried many ways, but i think the only two solutions would be

  1. Get the existing uppy instance and update config (not possible like i saw the at the uppy docs... or i did not saw how to :))
  2. Update the silverstripe addon to accept the "{locale:{strings:{browse: 'xxxx'}}}" config from yaml :)

Maybe there is another way which i did not saw and you could tell me ;-)
Otherwise i would make a PR for #2 ๐Ÿ˜„

Make UserForms suggested, not a requirement

It would be great if I could install the module to just use the normal field without having to install UserForms.

You could make composer suggest UserForms and wrap the EditableField classes in an if class exists condition.

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.