This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
UploadiFive 1.1.1 has been released which includes a small fix for added support on touch devices including iOS 6 devices.
Files don't get uploaded
  • Howdy, first of all I have to say I love Uploadify. However, it's "folder" setting is a huge security issue. I'm trying to specify the folder in the "uploadify.php", however It doesn't seem to upload files. The progress bar goes to 100%, it says "complete", but there are no files in the directory. It works perfectly if i use $_REQUEST['folder'] in "uploadify.php". Here's my code:



    upload.php


    <html>
    <head>
    <title>Uploader</title>
    <script type="text/javascript" src="js/uploadify/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="js/uploadify/swfobject.js"></script>
    <script type="text/javascript" src="js/uploadify/jquery.uploadify.v2.1.4.min.js"></script>
    <script type="text/javascript">
    <!--
    jQuery(document).ready(function() {

    $('#file_upload').uploadify({
    'uploader' : 'js/uploadify/uploadify.swf',
    'script' : 'js/uploadify/uploadify.php',
    'multi' : true,
    'height' : '50',
    'width' : '200',
    'sizeLimit' : '8388608',
    'simUploadLimit' : '1',
    'buttonImg' : 'img/browse.png',
    'cancelImg' : 'js/uploadify/cancel.png',
    'expressInstall' : 'js/uploadify/expressInstall.swf',
    'fileDesc' : 'Archive files (.zip)',
    'fileExt' : '*.zip',
    'queueSizeLimit' : '5',
    'removeCompleted' : false,
    'folder' : 'temp',

    onProgress: function() {
    $('#loader').show();
    },
    onAllComplete: function() {
    $('#loader').hide();
    },

    });

    $('ul li:odd').addClass('odd');

    });
    -->
    </script>

    <link rel="stylesheet" type="text/css" href="style.css" media="screen" />
    </head>


    uploadify.php


    <$php
    if (!empty($_FILES)) {
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . 'files/';
    // I would like to upload in "files", not "temp" as the folder setting suggests
    $targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];

    // $fileTypes = str_replace('*.','',$_REQUEST['fileext']);
    // $fileTypes = str_replace(';','|',$fileTypes);
    // $typesArray = split('\|',$fileTypes);
    // $fileParts = pathinfo($_FILES['Filedata']['name']);

    // if (in_array($fileParts['extension'],$typesArray)) {
    // Uncomment the following line if you want to make the directory if it doesn't exist
    // mkdir(str_replace('//','/',$targetPath), 0755, true);

    move_uploaded_file($tempFile,$targetFile);
    echo str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);
    // } else {
    // echo 'Invalid file type.';
    // }
    }
    ?>


    I know a tiny bit of PHP, and this should work IMO... If I use this it works.
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';;


    Looking forward to all replies.

    ~ Shadowflux