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.
uploadify And session
  • welcome, I have a problem with session in uploadify, if you can help me, please anserw this post.
    i show you my script code



    <html xmlns="http://www.w3.org/1999/xhtml"&gt;
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Uploadify scriptData Sample</title>

    <link rel="stylesheet" href="fileupload/css/uploadify.css" type="text/css" />

    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="js/jquery.uploadify.js"></script>
    <script type="text/javascript" charset="utf-8">
    var sessionId = "<?php echo session_id(); ?>";
    </script>

    <script type="text/javascript">


    $(document).ready(function() {

    $("#fileUpload").fileUpload({
    'uploader': 'uploader.swf',
    'cancelImg': 'cancel.png',
    'method' :'post';
    'script': 'upload1.php',
    'scriptData', {'sessionId': sessionId},
    'fileDesc': 'Image Files',
    'method': 'post',
    'fileExt': '*.jpg;*.jpeg',
    'multi': false,
    'buttonText': 'browse',
    'displayData': 'speed',
    'onComplete' : function(){
    location.reload(true);
    },
    'onError' : function(){ alert('error');}
    });
    });

    </script>
    </head>
    <body>
    <fieldset style="border: 1px solid #CDCDCD; padding: 8px; padding-bottom:0px; margin: 8px 0">
    <legend><strong>add photo</strong></legend>
    <div id="fileUpload">problem with javascript</div>
    <a href="javascript:$('#fileUpload').fileUploadStart()">OK</a></li>
    <a href="javascript:$('#fileUpload').fileUploadClearQueue()">clean</a></li>
    </body>
    </html>


    upload.php

    <? session_id($_POST['sessionId']);
    session_start();
    $user=$_SESSION['User_Authorization'];
    if (!empty($_FILES)) {
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_GET['folder'] . '/';
    $targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];


    // 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);


    $query= mysql_query("insert into avatar (`id`,`user_id`,`photo`) Values ('','$user','$targetFile')");



    user_id is blank, i think session is blank, but why? i write the code fallowing tutorial in this forum... Please help me.
  • From a quick look, first of all put session_start before you try to work with any session variables. Your $_SESSION['user_autherization'] is empty because you dont put anything in there ex.: $_SESSION['user_autherization'] = session_id(); hope it helps a little.
  • The user and all related content has been deleted.