Giter Site home page Giter Site logo

JSZip with Blob unexpected behaviour about jszip HOT 6 CLOSED

stuk avatar stuk commented on August 26, 2024
JSZip with Blob unexpected behaviour

from jszip.

Comments (6)

dduponchel avatar dduponchel commented on August 26, 2024

Good idea. If JSZip can use the File API (when reading or writing), it will be easier and more straightforward to use in some use cases.
I have started working on it.

from jszip.

dduponchel avatar dduponchel commented on August 26, 2024

This is on my branch issue23. This should solve the stackoverflow issue with a

sendFile("x.zip", zip.generate({responseType:"blob"}));

I still need to be sure I didn't break older browsers (I will be able to test IE 6-9 the next week).
@Stuk : could you check the updated documentation ? I would like to be sure you're ok with the responseType parameter and the new examples.

from jszip.

Stuk avatar Stuk commented on August 26, 2024

The extra option looks good, but I think just type would be a better name, as there is no response :)

Do you think it would be a good idea to deprecate the base64 option in lieu of type: "base64" to keep things simple?

Finally, could you add the other possible values (uint8array, arraybuffer ) to the jsdoc?

from jszip.

dduponchel avatar dduponchel commented on August 26, 2024

You're right, type is better. I spent to much time playing with the ajax's responseType :)

I think that deprecating base64 is a good idea : generate({type:"string"}) doesn't clearly show what the output will be (but will confuse the reader) and generate({type:"arraybuffer", base64:true}) doesn't make any sense.

My branch issue23 should be ready this week-end !

from jszip.

dduponchel avatar dduponchel commented on August 26, 2024

JSZip now generates Blobs / ArrayBuffers / Uint8Array, check the documentation. Thanks for the bug report :)

from jszip.

pbhd avatar pbhd commented on August 26, 2024

Good job!, I consider JSZip a very usefu piece of code. Keep going...

Cheers, Peter  

Von: David Duponchel <[email protected]> 

An: Stuk/jszip <[email protected]> 

Cc: pbhd <[email protected]> 

Betreff: Re: [jszip] JSZip with Blob unexpected behaviour (#23) 

Datum: Tue, 22 Jan 2013 21:40:00 +0100 

JSZip now generates Blobs / ArrayBuffers / Uint8Array, check the

documentation [1]. Thanks for the bug report :)

Reply to this email directly or view it on GitHub [2].

Links:

[1] http://stuk.github.com/jszip/#doc_generate_options
[2] #23 (comment)

from jszip.

Related Issues (20)

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.