Im trying to setup a page with multiple file uploader sections
anyway it was working fine so far but i have encountered a little problem:
I want a new folder to be created for the files each time an uploader on that page is used.
So i add a mkdir
command inside the php.php that valums uses to handle the upload procedure.
With that mkdir
inside the php.php, the folder gets created and files get uploaded so the procedure works...
BUT i get a "failed" message next to each filename on the transferlist.
the whole thing works fine without that mkdir
.
Where should i start looking? any ideas?
here's the code
<script>
function createUploader<?php echo $c; ?>(){
var uploader = new qq.FileUploader({
element: document.getElementById('uploadroom<?php echo $c; ?>'),
action: '../common/jqueryplugins/valums/server/php.php',
debug: true,
// ex. ['jpg', 'jpeg', 'png', 'gif'] or []
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
dragDrop: false,
params: {
planid: '<?php echo $_SESSION['planid']; ?>',
roomname: 'room<?php echo $c; ?>'
}
});
}
$(document).ready(function(){createUploader<?php echo $c; ?>(); });
</script>
i'm getting some variables from php, as this part is being replicated a bunch of times, different buttons upload to different folders.
inside the php.php file (at the top) i got something like this:$uploaddir = '../../../../rental/userfiles/1/'.$_GET['planid'].'/images/'.$_GET['roomname'].'/';
mkdir($uploaddir);
a weird uploaddir and my mkdir command
and at the end:
`$result = $uploader->handleUpload($uploaddir);`
these are mostly the things ive changed
and i get a "failed" next to the filename although it works perfectly
If you don't have the provided CSS loaded it's going to show failed. By default that span is hidden.