Files not saving

Last post 02-01-2011, 2:06 PM by MastaBaba. 2 replies.
Sort Posts: Previous Next
  •  02-01-2011, 1:25 AM 65980

    Files not saving

    I'm testing this locally, but it's not working for me. The script tells me (the user) that files upload successfully, but the 'savefiles' folder remains empty. Changing the name of the 'savefiles' folder also doesn't throw an error, the files still, seemingly, uploading successfully, but without actually uploading.
    Filed under: ,
  •  02-01-2011, 9:46 AM 65989 in reply to 65980

    Re: Files not saving

    Dear MastaBaba,
     
    I have tested the following snippet, if the destination folder is not existing, it will throw error. You can upload one file called "11test11.zip", after the upload is finished, you can search "11test11.zip" in your server, it must have been saved to your server if nothing error is thrown.
    <?php require_once "phpuploader/include_phpuploader.php" ?>
    <?php session_start(); ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
     <title>Demo 1 - use SaveDirectory property</title>
    </head>
    <body>
     <?php
      $uploader=new PhpUploader();  
      $uploader->MultipleFilesUpload=true;
      $uploader->InsertText="Select multiple files (Max 1000M)";  
      $uploader->MaxSizeKB=1024000;
      $uploader->AllowedFileExtensions="*.jpg,*.png,*.gif,*.bmp,*.txt,*.zip,*.rar";  
      $uploader->SaveDirectory="savefiles/savefiles1";  
      $uploader->FlashUploadMode="Partial";  
      $uploader->Render();  
     ?> 
     </div>  
     <script type='text/javascript'>
     function CuteWebUI_AjaxUploader_OnTaskComplete(task)
     {
      var div=document.createElement("DIV");
      var link=document.createElement("A");
      link.setAttribute("href","savefiles/"+task.FileName);
      link.innerHTML="You have uploaded file : savefiles/"+task.FileName;
      link.target="_blank";
      div.appendChild(link);
      document.body.appendChild(div);
     }
     </script> 
    </body>
    </html>
     
    Thank you for asking
  •  02-01-2011, 2:06 PM 65995 in reply to 65989

    Re: Files not saving

    The bundled examples saved the uploaded files to a temporary folder, but not to the destination folder. Your example does, though I removed the "savefiles1" for it to work.
View as RSS news feed in XML