Giter VIP home page Giter VIP logo

hup's People

Contributors

gadlol avatar sanemethod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gadlol

hup's Issues

readAsDataURL returns wrong data when chunked

readAsDataURL returns wrong event.target.result WHEN we use the DeferReader AND we use the chunked option to true AND the type is image (perhaps the same problem for other types).

The problem is that it does not add the file type in the data string:

data:;base64,lVKENsd8bVZG7K2wAI+zQb/jiqpV2l9Z/hIoaAbV+.......

it should be

data:image/jpeg;base64,lVKENsd8bVZG7K2wAI+zQb/jiqpV2l9Z/hIoaAbV+.......

That problem in Chrome.

In Firefox we get:

data:application/octet-stream;base64,NGmHgRJvqzLVtN01ULFQkB/.......

which is again wrong. I guess Firefox auto adds "application/octet-stream"

So there is something wrong with the DeferReader when chunked option is true.

P.S. When we don't use chunked then it works fine as it should be.

Filtering files

Hi Christopher!

First of all - I love your HUp plugin! I easily managed injecting it into my project. But I can't find the way how to filter files before the upload. Simply, let's say I want to allow uploading only image files or files below 10MB. I know I could do that server-side but I don't want to for two reasons:

  1. If someone uploads a 700MB file while allowed size is 10MB it would be unnecessary burden for the server
  2. In my UI I'm providing a progress bar. I don't want the user to see the bar growing green just to experience a "file not allowed" message at the end of the upload.

Best regards,
Mateusz

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.