When uploading files with pluploader the small files are uploaded without issue, but as soon as the files are chunked the script loses the actual file name which results in the following error:
Failed to open input stream
So, I need a way to pass the actual filename from the HTML form to the upload php. There is a line in the custom.html file that says:
browse_button : 'pickfiles', // you can pass an id...
container: document.getElementById('container'), // ... or DOM Element itself
In the DOM the element I need is file.name in this script part
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>';
});
Can anyone suggest how I can achieve this? I have tried accessing the element with java and isset but without any success.
In plupload there is a main upload script called upload.php and this is the code that renames the uploaded file to a meaningless code i. e. file_6272e003ad256 and this is the code in upload.php that renames that file id name
So, search this file for the word filename
Then extract the phrase between the double quotes and this is the filename to rename the file with