Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Options for client side zip file extraction before upload

Our problem

We are building a browser based application that allows a user to upload files to a server for processing. The server side is written in PHP using the Codeigniter v2.0.2 framework. The files to be uploaded are the output of another system and their format is out of our control. They can be very large (100's of MB) but much of their content is not needed for the server side processing. The files themselves are actually zip format (albeit with a bespoke extension) and containing a lot of image files together with a relatively small XML file and it is only this we need for the server side processing. Obviously it would be pretty wasteful to send the entire file when we need less than 1% of it's mass. We also don't want to ask users to manually extract the XML from the file.

My question

What are our options for writing client side code that can extract the XML file from the zip and send it? Happy to consider any technologies that run in most modern browsers. Whilst we are a C#/C++ coding house, web technologies are not our day-to-day so code examples gratefully received!

Many thanks.

like image 510
Toenex Avatar asked Jun 24 '11 09:06

Toenex


2 Answers

Are you looking for a library for zip compression? You can use SLSharpZipLib on the client side and its .NET counterpart on the server side.

like image 61
Michael Eakins Avatar answered Oct 06 '22 12:10

Michael Eakins


This Should be easily doable with a signed java applet, 90% users will have java installed,if not client can install it.

Signed Java applet will be able to access the file and extract the file you need and transfer it to your server.

This will also be quite fast so even large files will work just fine.

like image 33
Vikas Patial Avatar answered Oct 06 '22 12:10

Vikas Patial