0

How to write image raw content response from php to file with Javascript?

Actually I am using JSZip to compress some files in chrome extension. I am accessing the files with a rest call which gives response as file raw content(response as php file_get_content())

1

1 Answer 1

1

No you can't!

javaScript himself can't for security reasons...

  • You can use Ajax to send requests to a php function that will return you the file content or
  • You can use TiddlySaver jquery plug in which uses an applet (Note that the TiddlySaver applet is required on Opera and WebKit-based browsers (Safari, Chrome). The applet has to be present in the same folder as the respective HTML document. )
Sign up to request clarification or add additional context in comments.

Comments

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.