scottcheng / cropit

A "customizable crop and zoom" jQuery plugin.
http://scottcheng.github.io/cropit/
MIT License
875 stars 304 forks source link

Cropit: submit the contents of the cropit canvas instead of the original image when the form is submitted #33

Closed RobyOne1 closed 9 years ago

RobyOne1 commented 9 years ago

Hi, I would use Cropit in a script in classic Asp and I have the need to submit the contents of the cropit canvas instead of the original image when the form is submitted. I can't do it as the example reported in the issue #3, I think because the asp component that handles the upload, considers only the fields of type "file" and not "hidden" fields, as proposed in the issue #3. Can I change the content of fields of "file" type? Is there any other solution? Thank you.

scottcheng commented 9 years ago

Did you put the hidden input inside of the form? If you did, the value you put in the hidden input should go with the HTTP request when the form is submitted, and then the server would be able to retrieve it. You don't need to (and I don't think you can) change the content of the file input. Let me know if you have any further questions.

Since many people are asking about this use case, I'm planning to put together an example soon.

scottcheng commented 9 years ago

Just added a demo for this use case: https://github.com/scottcheng/cropit/blob/787730adc381f8ab4d6b5dcf883c6ff884f44278/demo/form.html