Giter Site home page Giter Site logo

uppy-override-delete's Introduction

uppy-override-delete

Uppy Upload client but can override delete method

Why

https://uppy.io/ is good enough Javascript file uploader.
It has overridePatchMethod option which transform patch method to post, but doesn't have the same one for delete method.
Since some of my clients blocked DELETE request for security reason and I want uppy to work perfectly on those environments too, I decided to add the option.

Currently following Uppy v3.5.0 + chrome crash resolved commit(8673335) all the same but only has overridePatchMethod option.

What

if you turn on overridePatchMethod option

  • it will send POST request instead of DELETE
  • it will add a header name:"X-HTTP-Method-Override", value:"DELETE"

How

var uppy = new Uppy()
  .use(Dashboard, {
      inline: true,
      target: '#drag-drop-area',
      showProgressDetails: true,
  })
  .use(Tus, {
      endpoint: 'http://localhost:8080/upload',
      chunkSize: 5000000,
      overridePatchMethod: true, // Override Patch
      overrideDeletehMethod: true, // Override Delete
  })

Simply set overrideDeletehMethod value true. that's it

Files

๐Ÿ“„ uppy.js

about 900 KB, which is still minified version but prettyfied to see what's happening on code and add required function

๐Ÿ“„ uppy.min.js

about 500kb which is much smaller. recommened to use

if you want to implement your own one on newer versions, just check the commit log and add what you need.
Or Any Pull Reqeust for newer versions are always welcomed. Thanks

uppy-override-delete's People

Contributors

shanepark avatar

Watchers

 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.