Note that there are some explanatory texts on larger screens.

plurals
  1. POuploadifive: uploading does not work, maybe it's a root issue?
    primarykey
    data
    text
    <p>The past 6 days I have been busy with multiple file upload. I found uploadify and tried the free version. Didn't work out so I bought uploadifive. Still doesn't work out. Even if I change nothing to the code and just implement it as I got it, is doesn't upload the file. I don't get any errors, the uploadbar goes to 100%. And my uploadfolder stays empty. I have set chmod permissions to 755 as advised and also tried 777. I tried changing $_SERVER['DOCUMENT_ROOT'] . $targetFolder to an absolute path. When I echo Document_Root it only gives /htdocs. It doesn't matter in which folder I put it. </p> <p>I'm losing my mind over this and don't know how to solve this. Below I've posted the code from index.php and uploadifive.php as I got it after download:</p> <p>Index.php</p> <pre><code>&lt;form&gt; &lt;div id="queue"&gt;&lt;/div&gt; &lt;input id="file_upload" name="file_upload" type="file" multiple="true"&gt; &lt;a style="position: relative; top: 8px;" href="javascript:$('#file_upload').uploadifive('upload')"&gt;Upload Files&lt;/a&gt; &lt;/form&gt; &lt;script type="text/javascript"&gt; &lt;?php $timestamp = time();?&gt; $(function() { $('#file_upload').uploadifive({ 'auto' : false, 'checkScript' : 'check-exists.php', 'formData' : { 'timestamp' : '&lt;?php echo $timestamp;?&gt;', 'token' : '&lt;?php echo md5('unique_salt' . $timestamp);?&gt;' }, 'queueID' : 'queue', 'uploadScript' : 'uploadifive.php', 'onUploadComplete' : function(file, data) { console.log(data); } }); }); &lt;/script&gt; </code></pre> <p>uploadifive.php</p> <pre><code>// Set the uplaod directory $uploadDir = '/uploads/'; // Set the allowed file extensions $fileTypes = array('jpg', 'jpeg', 'gif', 'png'); // Allowed file extensions $verifyToken = md5('unique_salt' . $_POST['timestamp']); if (!empty($_FILES) &amp;&amp; $_POST['token'] == $verifyToken) { $tempFile = $_FILES['Filedata']['tmp_name']; $uploadDir = $_SERVER['DOCUMENT_ROOT'] . $uploadDir; $targetFile = $uploadDir . $_FILES['Filedata']['name']; // Validate the filetype $fileParts = pathinfo($_FILES['Filedata']['name']); if (in_array(strtolower($fileParts['extension']), $fileTypes)) { // Save the file move_uploaded_file($tempFile, $targetFile); echo 1; } else { // The file type wasn't allowed echo 'Invalid file type.'; } } </code></pre> <p>Does anyone see what would be the problem here?</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.
    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