Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

  • Hi there,

    I am trying to use uploadfy in MOODLE... using their require_js function, I can include jquery in http://mysite.com/lib/jquery/

    however, I'm confused where "uploads" folder should be.

    Should it be in a) the folder that the script is executing in? Or, in the lib/jquery/uploads folder?
  • The upload folder should be configured in relation to the form. So if your form is in www.yoursite.com/forms put your uploads folder in the directory www.yoursite.com/forms/uploads and then in your uploadify function put 'folder':'uploads/'. If the folder was in your site root www.yoursite.com/uploads, then you would put 'folder':'../uploads/' in your uploadify function.
  • Hi superunited,

    I tried doing what you said ut still get an IO error... Here is my code:

                      

    echo '<script type=\"text/javascript\">';

    echo ' var uploads=\"'.SLOODLE_WWWROOT.'/view/uploads/\";';
    echo ' var imagefolder=\"lib/jquery/uploads/\";';
    echo '$(document).ready(function() {';
    echo '$(\'#fileInput\').fileUpload ({';
    echo \"'uploader' : '/sloodle/mod/sloodle/view/uploader.swf',\";
    echo \"'script' : '/sloodle/mod/sloodle/view/upload.php',\";
    echo \"'multi' : true,\";
    echo \"'cancelImg' : '/sloodle/mod/sloodle/view/cancel.png',\";
    echo \"'buttonText': 'Select Files',\";
    echo \"'auto' : true,\";
    echo \"'folder' : 'uploads',\";
    echo \"'scriptAccess': 'always',\"; //set to always for testing locally - delete this line for remote deployment
    echo \"'fileDesc' : 'jpg;png;gif',\";
    echo \"'fileExt' : '*.jpg;*.png;*.gif',\";
    echo \"'onAllComplete': function() {\";
    echo '$(\'#filesUploaded\').append(\'<input type=\"submit\" value=\"'.$strAddfiles.'\" name=\"fileaddentry\" />\');';
    echo \"\";
    echo ' },';
    echo \"'onComplete': function(event, queueID, fileObj, response, data) {\";
    echo '$(\'#filesUploaded\').append(\'<table><tr><td width=100>Name:</td><td> <input type=\"text\" id=\"filename\" name=\"filename[]\" value=\"\'+fileObj.name+\'\" size=\"60\" maxlength=\"255\" /></td><td width=\"100\"><label>Type:</label><select name=\"filetype\" id=\"filetype\" size=\"1\"><option value=\"\">image</option></select></td></tr></table>\');';
    echo '$(\'#filesUploaded\').append(\'<table><tr><td><img src=\"\'+uploads+fileObj.name+\'\" width=\"100\" height=\"100\"></td></tr></table>\');';
    echo '$(\'#filesUploaded\').append(\'<table><tr><td width=100>Url:</td><td> <input type=\"text\" id=\"fileurl\" name=\"fileurl[]\" value=\"\'+root+imagefolder+fileObj.name+\'\" size=\"60\" maxlength=\"255\" /><br></td><td width=\"100\"></td></tr></table>\');';
    echo '$(\'#filesUploaded\').append(\'<HR>\');';
    echo \"} \";
    echo\" }); });\";
    echo \"</script>\";


    As you can see, I've specified my folder to be: /sloodle/mod/sloodle/view/uploads, and this folder exists on my server with proper permissions, yet still get an error
  • add this code http://uploadify.com/forum/viewtopic.php?f=5&t=12

    Uploadidy only shows the last error that occurs. The above code will display any errors that occur before the io error. It will be these errors that cause the io error.