0

So a docx file is actually a bunch of meta data files + some other bits and bobs compressed. I am looking to create a online text editor which will create a format similar to docx.

In my head the end result will be: after the user writes his content in the web browser and hits save the client will get together all the meta data files and zip them up. They will then send it to the server which will store the files.

The trouble is I have no idea where to get started on the client side of creating the files and zipping them up. Idealy I would want the client to be in charge of all of that to reduce overhead on the server. Would anyone be able to point me in the right direction on were to begin with this?

5
  • stuk.github.io/jszip or gildas-lormeau.github.io/zip.js Commented Sep 9, 2013 at 15:08
  • If you're doing the zipping to save bandwidth then you're betting off making sure gzip compression is enabled. This will achieve the same reduction. Commented Sep 9, 2013 at 15:10
  • @FritsvanCampen - not for uploads Commented Sep 9, 2013 at 15:11
  • stuk.github.io/jszip is great. (oops, echo in here...) Commented Sep 9, 2013 at 15:54
  • you can simply deflate it, that's less work on both ends... Commented Sep 9, 2013 at 15:56

1 Answer 1

1

I wouldn't advise doing it client side. You don't know what the client might be sending back in a zip file. Do this securely on the server. If you can't afford the overheads then you might want to create a different service.

Sign up to request clarification or add additional context in comments.

2 Comments

Beware of the zip bombs. Compressing a 20GB file with just characters a in it will give you a ridiculously small filesize, not so much when you unzip it.
ok after reading this, I think I'll do it server side. I'll let the client send the content of the file to the server and I'll just construct it all server side

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.