Problem with multiple Uploads: 'Invalid Guid'

Last post 10-20-2010, 10:55 PM by cutechat. 2 replies.
Sort Posts: Previous Next
  •  10-15-2010, 6:32 AM 64441

    Problem with multiple Uploads: 'Invalid Guid'

    Hello,
     
    what I'm trying to do is the following:
    Providing an upload module for different imagesets...
     
    But as soon as there is more than one image (in my case), the saving fails with the above mentioned error message...
     
    Furthermore there seems to be no effective way to prevent the upload of more than one file per Uploader (which would have been the annyoing workaround) ... you get an error-Alert with "MultipleFilesUpload" set to false when selecting more than one file in the "Select file"-Dialogue but if you add just one file per click on "Upload" the files are added and submit then crashes (see above)...
     
    The POST is sent with an "/" to separate the entries, but the preg_match in "PhpUploader_GetGuid()" then fails, because the "/" is not allowed...
     
    Here are some further suggestions:
    - it is not possible to cancel uploads, once they are uploaded (would be handy, if you can just upload e.g. 5 pics, but you change your mind later)
    - a preview of the files (if imagefiles)  would be handy
    well, i tried to to build the qeueelist with previews and delete-button myself, but this won't work as long as there is above mentioned error...
     
    here is my code (tested on both: Windows and Linux) :
     
    1. <?php  
    2.         $this->uploader = new PhpUploader();  
    3.         $this->uploader->MultipleFilesUpload = false;  
    4.         $this->uploader->Name="myuploader";  
    5.         $this->uploader->MaxFilesLimit = 1; 

    6.         $fileguid=@$_POST["myuploader"];     
    7.         if($fileguid) {  
    8.             //get the uploaded file based on GUID     
    9.             $mvcfile = $this->uploader->GetUploadedFile($fileguid);     
    10.             if($mvcfile) {
    11.                $mvcfile->MoveTo(RDA_TEMP.File::getUniqueFileName($mvcfile->FileName,RDA_TEMP));   
    12.             }     
    13.         }  
    14. ?>  
    15. <script language="javascript" type="text/javascript">  
    16.             function CuteWebUI_AjaxUploader_OnQueueUI(list) {  
    17.                       
    18.             }  
    19.             function CuteWebUI_AjaxUploader_OnPostback() {  
    20.             } 
    21. </script>
    22.   
    23. <form id="form1" method="POST">      
    24.             <fieldset>  
    25.                  <?php $this->uploader->Render(); ?>
    26.             </fieldset>  
    27.             <input type="submit">  
    28.         </form>
     
     
     
  •  10-18-2010, 10:45 AM 64472 in reply to 64441

    Re: Problem with multiple Uploads: 'Invalid Guid'

    Well,
     
    the error message is gone now...
    but there is still the problem with the maxFilesupload, which limits simultaneous downloads but not downloads added one after another.
     
    Thanks, Timo
  •  10-20-2010, 10:55 PM 64546 in reply to 64472

    Re: Problem with multiple Uploads: 'Invalid Guid'

    Timo,
     
    OK. for multiple files upload , you need split the string into guid array , and process one by one .
     
    Do you mean the MaxFilesLimit property ? I am not sure what you mean.
     
    Regards,
    Terry
     
View as RSS news feed in XML