How to create a zip file containing a whole directory of chosen file and upload it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PavelRumberg
    New Member
    • Jul 2010
    • 1

    How to create a zip file containing a whole directory of chosen file and upload it?

    Hello!
    I'm building a system which allow users to upload files for storage.
    There are many handled file types in my system but I can't figure out how to upload "Solid Works" projects, which are the main data objects for my system to deal with.
    "Solid Works" projects are bunch of files related and depending on each other, but they all sit under the same directory.
    My idea is, when the user clicks on "Solid Works" main file in his upload dialog, the system will create a zip file containing all the files within that directory (on client's computer), and when the zip file creation is done, to upload it.
    I'm writing my system in PHP, using DRUPAL 6.
    Thank You for Your time!..
    Pavel.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    this will not work ... at least not with JavaScript and not cross-browser compatible. JavaScript doesn't have filesystem access to the client's machine ... otherwise any website could spy at your HD ... so it is a security issue. It might be that an IE only solution could be done with an ActiveX component ... but i don't know such ... so you would need to search for yourself ... but as i said: you will not find a general solution for such a task ... JavaScript is not capable to do such things.

    kind regards

    Comment

    Working...