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.
  • Hi There,

    i want to let uploadify check if a file i already on the server or not. So I implemented uploadify like this:

    <script type=\"text/javascript\" src=\"source/uploadify/jquery-1.3.2.min.js\"></script>
    <script type=\"text/javascript\" src=\"source/uploadify/jquery.uploadify.js\"></script>
    <script type=\"text/javascript\">

    $(document).ready(function() {
    $('#upload').fileUpload({
    'uploader': 'source/uploadify/uploader.swf',
    'script': 'source/uploadify/upload.php',
    'checkScript' : 'source/uploadify/check.php',
    'folder': 'source/banners',
    'cancelImg': 'source/uploadify/cancel.png',
    'multi' : true,
    'auto' : true,
    'buttonText' : 'DURCHSUCHEN',
    'displayData' : 'percentage',
    'onComplete' : function(event, queueID, fileObj, response, data) {
    $('div#status').append(\"Datei hochgeladen: \" + fileObj.name + \" <br />\");
    }
    });
    });

    </script>


    But now the upload does not start. I'm using the uploadify check.php. Now, can you tell me what I'm doing wrong?

    Thanks and greetings
    daniel
  • Hi battlewizz,

    I just checked your code and it worked fine for me, but of course I couldn't check your paths - so doublecheck them and also check the id of the FileUpload in the input


    <input name=\"fileUpload\" id=\"upload\" type=\"file\" />
  • Hi,

    thanks for the quick reply. I checked the paths but they are all correct. I can open the check.php if i paste the path into my browser adress bar. But that does'nt stop the script from not working. :(

    Here's the html I'm using right now:

    <body>

    <h1>foo bar</h1>

    <div id=\"uploadbox\">
    <input name=\"fileUpload\" id=\"upload\" type=\"file\" />
    </div>

    <div id=\"status\"></div>

    </body>


    battlewizz
  • Try adding the onError sample code I posted to the thread "Some questions". It will output the starting folder your relative path needs to start from.
  • Okay, i added the onError-Code from your post, but the results stay the same. There is no alert triggered and the script stops with this screen: image.
  • What is your HTML element code?
  • TravisN. said:
    What is your HTML element code?


    This is all the Code there is:

    <html>

    <head>

    <title>Upload-Test</title>

    <script type=\"text/javascript\" src=\"source/uploadify/jquery-1.3.2.min.js\"></script>
    <script type=\"text/javascript\" src=\"source/uploadify/jquery.uploadify.js\"></script>
    <script type=\"text/javascript\">

    $(document).ready(function() {
    $('#upload').fileUpload({
    'uploader': 'source/uploadify/uploader.swf',
    'script': 'source/uploadify/upload.php',
    'checkScript' : 'source/uploadify/check.php',
    'folder': 'source/banners',
    'cancelImg': 'source/uploadify/cancel.png',
    'multi' : true,
    'auto' : true,
    'buttonText' : 'DURCHSUCHEN',
    'displayData' : 'percentage',
    'onComplete' : function(event, queueID, fileObj, response, data) {
    $('div#status').append(\"Datei hochgeladen: \" + fileObj.name + \" <br />\");
    },
    onError: function (a, b, c, d) {
    if (d.status == 404)
    alert('Could not find upload script. Use a path relative to: '+'<?= getcwd() ?>');
    else if (d.type === \"HTTP\")
    alert('error '+d.type+\": \"+d.status);
    else if (d.type ===\"File Size\")
    alert(c.name+' '+d.type+' Limit: '+Math.round(d.sizeLimit/1024)+'KB');
    else
    alert('error '+d.type+\": \"+d.text);
    }
    });
    });

    </script>

    <style>
    body {
    font: 12px/18px Arial, Helvetica, sans-serif;
    }
    .fileUploadQueueItem {
    font: 11px Verdana, Geneva, sans-serif;
    background-color: #F5F5F5;
    border: 3px solid #E5E5E5;
    margin-top: 5px;
    padding: 10px;
    width: 300px;
    }
    .fileUploadQueueItem .cancel {
    float: right;
    }
    .fileUploadProgress {
    background-color: #FFFFFF;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    border-right: 1px solid #C5C5C5;
    border-bottom: 1px solid #C5C5C5;
    margin-top: 10px;
    width: 100%;
    }
    .fileUploadProgressBar {
    background-color: #0099FF;
    }
    </style>

    </head>

    <body>

    <h1>foo bar</h1>

    <div id=\"uploadbox\">
    <input name=\"fileUpload\" id=\"upload\" type=\"file\" />
    </div>

    <div id=\"status\"></div>

    </body>

    </html>



    battlewizz
  • This one's has me stumped. I recreated the folder structure you have used, and I was able to upload multiple files without a problem. My only thought is server settings. Check this post http://www.uploadify.com/forum/viewtopic.php?f=7&t=13.
  • To be honest, I don't think that this has something do do with the server settings you mentioned. The thing is, if I delete the checkScript Option from the Code, the upload works perfectly fine, and I'm able to upload as many files at the same time as i want. But then I can't check if the files already exist...
  • If you download the "Uploadify Sample Collection" from the downloads section, and run the second sample down do you still get the error?
  • I just tested putting in a wrong path into the checkScript option, and I get the same result you are experiencing. Do one or two things.

    1. Double check your relative paths
    2. Compress you folder structure including all js, css etc files, attach it to a post and I'll have a look.
  • TravisN. said:
    If you download the "Uploadify Sample Collection" from the downloads section, and run the second sample down do you still get the error?


    I ran the second example and, yeah, it's still the same. It stops before uploading. Seems like the problem does come from the server, but what can it be? Some falsely set user rights? I still attached my folder structure so you can have look.

    Battlewizz
  • hmmm. It is looking like server settings. I copied your folder setup to my server and all ticked over without a problem.

    Let's have a look at
    1. what OS is your sever
    2. is your server local
    3. what are your php.ini settings - can you upload it so I can compare
    4. you said that if you remove the checkScript option it runs perfectly. But have the files actually uploaded?
  • TravisN. said:
    hmmm. It is looking like server settings. I copied your folder setup to my server and all ticked over without a problem.

    Let's have a look at
    1. what OS is your sever
    2. is your server local
    3. what are your php.ini settings - can you upload it so I can compare
    4. you said that if you remove the checkScript option it runs perfectly. But have the files actually uploaded?


    Hi, Sorry for the late answer.

    1. Linux (RedHat)
    2. No
    3. i attached my php.ini (now it should be attached, sorry)
    4. Yeah, the files uploaded perfectly

    Hope this helps...
  • Here's the main differences between my php.ini and yours
                       mine    yours
    max_input_time -1 60 -maximum time post and get scripts can send data (-1 = unlimited)
    memory_limit 124M 40M -should be greater than post_max_size

    and this, but I don't think this would have any effect. Worth a try though
    register_argc_argv On Off -Used for sending GET values across scripts

    There were others but nothing that relates to scripts. Try changing these values.
  • Also check to see if json is enabled. This isn't set in the php.ini. To check it create a new php file and put in phpinfo();
    when you run the page do a search for json. It needs to say enabled.
  • Chances are your server is running PHP 4 - the check.php script uses a
    json_encode
    function which is only included natively in PHP 5 - I had this problem as well. To solve this solution, you can either upgrade your PHP version or you can download a JSON.php file compatible with PHP 4 and include it in check.php before the encode call. Hope this helps.

    Matt
  • seminole75 said:
    Chances are your server is running PHP 4 - the check.php script uses a
    json_encode
    function which is only included natively in PHP 5 - I had this problem as well. To solve this solution, you can either upgrade your PHP version or you can download a JSON.php file compatible with PHP 4 and include it in check.php before the encode call. Hope this helps.

    Matt


    That's it, thanks a lot.

    I included the following code in the check.php:

    <?php
    if (!function_exists('json_encode'))
    {
    function json_encode($a=false)
    {
    if (is_null($a)) return 'null';
    if ($a === false) return 'false';
    if ($a === true) return 'true';
    if (is_scalar($a))
    {
    if (is_float($a))
    {
    // Always use \".\" for floats.
    return floatval(str_replace(\",\", \".\", strval($a)));
    }

    if (is_string($a))
    {
    static $jsonReplaces = array(array(\"\\\", \"/\", \"\n\", \"\t\", \"\r\", \"\b\", \"\f\", '\"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\\"'));
    return '\"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '\"';
    }
    else
    return $a;
    }
    $isList = true;
    for ($i = 0, reset($a); $i < count($a); $i++, next($a))
    {
    if (key($a) !== $i)
    {
    $isList = false;
    break;
    }
    }
    $result = array();
    if ($isList)
    {
    foreach ($a as $v) $result[] = json_encode($v);
    return '[' . join(',', $result) . ']';
    }
    else
    {
    foreach ($a as $k => $v) $result[] = json_encode($k).':'.json_encode($v);
    return '{' . join(',', $result) . '}';
    }
    }
    }
    ?>


    and now it works fine. The good thing is that the code is upwards compatible, so if i get upgraded to PHP 5.2 or higher, the native json functions will be used instead of the custom ones. Problem solved. :)
  • You would never feel unbearable heat and sweat inside, because the Air Jordans is designed to be the best wear for this season.The same as many other
    Air Jordan Shoes,the release of the Air Yeezy Shoes also arouse fierce arguments among sneaker fans.
  • The Amalgamators's official profile including the latest music, albums, songs, music videos and more updates. 100Z
    medical autoclaves

    sterilizer autoclave

    dental sterilizer

    dental autoclave sterilizer
  • I started to follow yourMulberry Bags blogI know I should take some of your points into consideration but sometimesTrue Religion Outlet we can just get lazy.. after all we are just humans.Useful article,Dr Dre Beats acknowledgment for demography the time to put it together. Monster Beats SaleI like the administration you are demography your blog. I'll be bookmarking your website so I can accumulate upTrue Religion Jeans Canada in the future. Would like to see added posts soon.Usually I don't read article on blogs,TOMS Shoes Outlet but I would like to say that this write-up very forced me toCheap Chanel Bags try and do it! Your writing style has been amazed me. Thanks,Mulberry Messenger Bags very nice article.
  • Nothing gives more satisfaction, happiness and peace of mind than a good health.Healthy people can be found active and capable of achieving their goals within the allotted time. Retro Jordans In fact everybody knows the saying: “Health is wealth”. A person can be rich by millions of dollars and pounds and unless and otherwise he is healthy it may not be possible for him to enjoy the life and the money in his possession will serve no purpose as far as he is concerned.jordans for cheapEvery person should have some basic knowledge about well maintenance of the body from different kinds of ailments apart from maintaining good health.When it comes to good health, it consists of many factors namely;authentic retro jordans taking care of the face, nose, ears, eyes, neck, shoulders, hands, legs, feet, hair, teeth and nails on the one hand and on the other hand he needs to have a good digestive system.In regard to better care of the external organs,retro jordans for sale he needs to follow certain guidelines and when it comes to safe keeping of the digestive system, he should have appropriate dietary habits.In fact,cheap Authentic jordans people should take care of their vital organs like eyes, nose, ears, lips, mouth, face, chin, hair and neck. Normally, many people are getting their ears affected during winter seasons and appropriate ear muffs are helpful in preventing the ears getting damaged by cool and icy air.jordan retro 5 for sale The ears should be cleaned at periodical intervals and immediately after bathing with a nice towel the ears can be cleaned well so that the dust particles are removed from the ears thus allowing the ear passages cleared well for hearing. In the case of nose,Air Diamond Turf some people are allergic to winter while some are allergic to hot sun. If required nose masks can be used so that the nose is protected from hot sun and icy weather.retro 7 jordans Many people are using antiaging cream in order to keep the face neat and clean. Face can be protected by following some simple methods namely; avoiding usage of hard soaps,big size jordan shoes detergents or shampoo on the face; choosing a good moisturizing cream or oil that suits the skin; boosting the diet with vitamin C by eating plenty of fresh fruits; avoiding smoking; jordan 6 rings for saledrinking at least two liters of water; regularly doing the exercises for face and eyes; not exposing the face towards hot sun and many more. Good quality ear muffs should be the first choice in order to protect the ears and a good moisturizing antiaging cream should be selected for massaging the face at periodical intervals.
    My website:jordan retro 5 for sale
    jordan 6 rings for sale