Code Monkey home page Code Monkey logo

Comments (14)

 avatar commented on July 23, 2024 6

Sorry to resurrect a closed issue - but I was wondering if we could get an example of fileURL usage that @sapeish implemented?

from jszip.

diegovdev avatar diegovdev commented on July 23, 2024 1

Actually I already implemented this functionality as a method in JSZIP called fileURL, but before creating a Push Request I gave it to a few users to test it... (no IE tests are being made anyway)

from jszip.

diegovdev avatar diegovdev commented on July 23, 2024 1

Here is a sample of how I used the fileURL method I implemented.

from jszip.

dduponchel avatar dduponchel commented on July 23, 2024

There is no method in JSZip to do that. If you're using a third party library with ajax support (jQuery for example), you can easily GET the text file and put the result into a JSZip instance.

If you try to load a binary file (image, sound, zip) you may be interested in this comment.

from jszip.

dduponchel avatar dduponchel commented on July 23, 2024

@Stuk :
This is a frequent request (loading a remote zip file or adding the content of a remote file). While ajax requests are not in the scope of JSZip, loading binary files in all browsers is hard and we already have everything to do that (used in the unit tests).
Do you think we should separate that code as an extra module ? Not tied to JSZip but to JSZipUtils for example.

from jszip.

Stuk avatar Stuk commented on July 23, 2024

Yep, a separate module is appropriate. (sorry for late reply, been on holiday)

from jszip.

Stuk avatar Stuk commented on July 23, 2024

Really it should be a separate package (in the NPM/CommonJS sense), but sadly browser packaging isn't there yet (unless something like Mr or Browserify is used)

from jszip.

dduponchel avatar dduponchel commented on July 23, 2024
(no IE tests are being made anyway)

After every big change and before every release, I launch the unit tests in all the browsers I have and that includes IE 6 - 10. That's why the homepage says Tested with IE 6 / 7 / 8 / 9 / 10.

from jszip.

dduponchel avatar dduponchel commented on July 23, 2024

@Stuk I'll work on this (I currently work on the documentation and I just can't write "good luck, have fun !" for this part).
I'm ok with a new module (and replace browser-test-utils.js with a dependency to it) and I can create it. Do you prefer a repository on your side (at it makes sense to have stuk/jszip and stuk/jszip-utils) or should I create it on my side ?
And if you find a better name than jszip-utils, don't hesitate :)

from jszip.

Stuk avatar Stuk commented on July 23, 2024

Are you planning on adding more functionality than just file downloading? Otherwise something more specific like jszip-download or jszip-remote might be better.

If you're happy having it at Stuk/... then I am too. I've created jszip-utils which we can rename (although we should do that sooner rather than later).

from jszip.

dduponchel avatar dduponchel commented on July 23, 2024

I have no roadmap for this, but adding tools to wrap FileReaders could be a good idea for example. The other popular request is "how do I get the zip file ?" so if we ever find a better answer than FileSaver.js (and encouraging everyone to drop IE <= 9), we could add it too.

I don't mind having it at Stuk/jszip-utils : I prefer the JSZip users to see a consistent ownership and the utils package near the main package rather than an utils package somewhere on github by a unknown (if they don't start digging the commit logs / issue tracker) guy.

from jszip.

dduponchel avatar dduponchel commented on July 23, 2024

I've just released the version 0.0.1 of jszip-utils so I'm closing this issue.

from jszip.

Mithgol avatar Mithgol commented on July 23, 2024

For future references, that was https://github.com/Stuk/jszip-utils

API docs at http://stuk.github.io/jszip-utils/documentation/api.html

from jszip.

vipera7 avatar vipera7 commented on July 23, 2024

Can we get an example usage?

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.