Is there any jquery plugin that would do something like this: First, the user would specify a picture on his computer, after indicating he would boot reduced to opr. the size, + was deduc in the unit div and there it could be cut off. Well, so that the link to the photo was sent to the form handler. If there is no such miracle of the plug-in, then at least tell me in parts: for example, the plug-in for loading and reducing and the plug-in for ajax trim. And I will connect them) Prompt, pozh
- No, this is not in nature yet. But there are options for flash and java. - ling
3 answers
Such a mechanism should be a two-step process. The first stage is uploading the image to the server. The second is output of the loaded image to DOM, visual processing (read the preparation of processing instructions for the server), and sending these instructions.
Unfortunately (or fortunately), this option:
jQuery(function($){ $('input[type=file]').change(function(){ alert( $(this).attr('value') ); }); }); will display "C:\fakepath\Мое фото.jpg" . The file name is real, but the path to it is not. And locally loading it in <img /> won't work.
- Made ajaxSubmit `th, but it does not work in Google Chrome, at least. In general, I am surprised that everything always works in a moss, while in others I’m even afraid to climb ... Is there something like ajaxSubmit that is cross-browser? - iproger
- oneFor jQuery, there are [Ajax File Upload] [1] and [One Click Upload] [2] [1] plugins : phpletter.com/Our-Projects/AjaxFileUpload [2]: michaelmitchell.co.nz/one-click-upload - KiTE
- Thanks a lot , I'll try - iproger
- $ .ajaxSubmit works great in all browsers ... - Fucking Babai
- Well, the example did not work in Google Chrome, and the example of Ajax File Upload works - iproger
As already written, there is no @ling plugin.
Because to process a picture, you need to upload it to a server, then you can display it in a div to manipulate it on JS. then what is loaded in the div instead of the one that was in the original.
Yes, I did not find the plug-in, I had to do it myself (But there is nothing difficult there, I don’t understand why they didn’t make such a plugin ...
- Well, do it =) - Zowie
- And did (emoticon_language) - iproger
- @mctrane, can share))) - Vfvtnjd