I use Plupload so that users can upload images to my WordPress website.
When the user clicks the โSelect Filesโ button and selects an image from his gallery of mobile phones, the image file name appears on the screen. Then the user can click "Download Files" to start the download.
My problem
When the user clicks โSelect Filesโ and takes a photo using his camera phone, the image file name does not appear on the screen. In this case, when the user now tries to click "Download Files", nothing happens. How can i solve this?
Notes
The problem does not occur when I use my tablet or desktop.
Update
My testing was done using two mobile devices:
- Chrome on the Samsung Galaxy S4 Mini is running Android 4.2.2.
- Chrome on Samsung Galaxy Ace II is running Android 4.1.2.
Here is an example of the code I'm using: http://jsfiddle.net/djydce90/
My script
var uploader = new plupload.Uploader({ runtimes : 'html5,flash,silverlight,html4', browse_button : 'pickfiles', container: document.getElementById( 'container' ), url : "/examples/upload", filters : { max_file_size : '10mb', mime_types: [ {title : "Image files", extensions : "jpg,gif,png"}, {title : "Zip files", extensions : "zip"} ] }, flash_swf_url : '/plupload/js/Moxie.swf', silverlight_xap_url : '/plupload/js/Moxie.xap', init: { PostInit: function() { document.getElementById('filelist').innerHTML = ''; document.getElementById('uploadfiles').onclick = function() { uploader.start(); return false; }; }, FilesAdded: function(up, files) { plupload.each(files, function(file) { document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>'; }); }, UploadProgress: function(up, file) { document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>"; }, Error: function(up, err) { document.getElementById('console').innerHTML += "\nError #" + err.code + ": " + err.message; } } }); uploader.init();
My html
<script src="https://rawgit.com/moxiecode/plupload/master/js/plupload.full.min.js"></script> <div id="filelist">Your browser doesn't have Flash, Silverlight or HTML5 support.</div> <br /> <div id="container"> <a id="pickfiles" href="javascript:;">[Select files]</a> <a id="uploadfiles" href="javascript:;">[Upload files]</a> </div>
Link: http://www.plupload.com/examples/core
javascript php file-upload wordpress plupload
henrywright
source share