Get binary image data from input type "file" using JavaScript/jQuery for use with picture preview with AJAX in WebMatrix -
I have a problem when researching or trying to figure out how to get binary image data using Javascript For (if it is possible) / from a HTML input element of jQuery type
I am using WebMatrix (C #), but it may not be necessary to know that if the answers to the purposes of this question can be answered by javascript / jQuery alone.
I can take the image, save it in the database (in the form of binary data), after the page on post, I show a picture with binary data. However, before uploading, I leave a picture without preview, for which I am almost certain that I have to use AJX.
Again, this may not be possible, but as long as I have binary image data, I believe I can push it to the server with AJAX and in the same way I can process the image. , If I'm taking it from a database (note that I do not save the image files using GUID myself, I only save binary data.)
If using input elements An easy way to show a photo preview It will work fine, of course, for the full consideration behind me, it is to present a photo preview before pressing the submit button (or at least that deceptive).
** * ** * **** update < / Em> * ** * ** * **** I This is not a duplicate of any other question because my real question is: How can I get an input type with JavaSc "File" image data from Ript / jQuery? If I can just get the data back to the server (the correct format), then I should be able to work with it, and then have to back it with AJAX (though, I am absolutely no AJAX is not an expert.) According to my research, there is no way to get image previews in all IE versions using JavaScript only (This is because the full file path P I would like to ask my users to add sites to trusted sites, but you usually ask users to not tamper with those types of settings (by using them, as a potential security risk). Do not tell the site the fastest way to suspect users, just ask them to add your site to the list of trusted sites. It's like sending an email and asking for a password. "Just trust me! I am very safe!"):
Comments
Post a Comment