How can i use Twitter Bootstrap to upload a single image with preview and progress bar. As currently, Until I save the image, I can not see what any preview or progress bar to upload the image.
相关问题
- Views base64 encoded blob in HTML with PHP
- How to get the background from multiple images by
- How to add a “active” class to a carousel first el
- CV2 Image Error: error: (-215:Assertion failed) !s
- Full Clickable Accordion in Bootstrap
相关文章
- Use savefig in Python with string and iterative in
- Where does this quality loss on Images come from?
- Specifying image dimensions in HTML vs CSS for pag
- How to insert pictures into each individual bar in
- Make Bootstrap tab Active on the bases of URL link
- Rails: Twitter Bootstrap Buttons when visited get
- How do I append metadata to an image in Matlab?
- Img url to dataurl using JavaScript
I made a jQuery plugin which previews images from both file and URL. However, there's no progress bar (yet).
Code: https://github.com/egonolieux/bootstrap-imageupload
Demo: https://egonolieux.github.io/bootstrap-imageupload
Jasny's fork of Bootstrap allows you to do come close. See documentation.
The code:
It doesn't seem to have a progress bar, unfortunately.
Hereby, to upload directly using HTML Blob & FormData :
I tried the accepted answer, but couldn't get it to work.
There's a plugin at http://plugins.krajee.com/file-input. It requires Bootstrap 3 and JQuery 2.1
You can see some demos here and get the source here or here. The source also has other examples of AJAX uploading schemes, drag and drop, etc, in its
/examples/
folder. It's much more versatile than the Jensy plugin.The following code is what I use on my websites. Note that
file_path/kartik-v-bootstrap-fileinput-51ddb7c/
is the extracted source code folder on your machine:You can set
data-min-file-count="x"
if you want to make sure the use uploads at least x photos. I also personally like to editsource/js/fileinput.js
and set the following inpreviewCache
line 454: