Note that there are some explanatory texts on larger screens.

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

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload