javascript - FileUploaded function return thumbnail after upload -
i used api called plupload
, want return thumbnail images after files uploaded. every time upload image return it's thumbnail , put in div or after ajax called return images uploaded. code:
html:
<div class="well" id="prevcap">
javascript: plupload
uploader.bind('fileuploaded', function(up, file) { self._handlefilestatus(file); self._trigger('uploaded', null, { up: up, file: file } ); if (uploader.files.length == (uploader.total.uploaded + uploader.total.failed)) { var prev = '<img class="img-thumbnail" src="./assets/images/upload_tmp/'+ file.name +'">'; $("#prevcap").append(prev); } });
this working returns 1 image last image uploaded. i'm thinking of how can return filenames or image file ajax. or there other way return image uploaded. i'm newbie in javasript , plupload.
Comments
Post a Comment