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) :
- <?php
- $this->uploader = new PhpUploader();
- $this->uploader->MultipleFilesUpload = false;
- $this->uploader->Name="myuploader";
- $this->uploader->MaxFilesLimit = 1;
- $fileguid=@$_POST["myuploader"];
- if($fileguid) {
-
- $mvcfile = $this->uploader->GetUploadedFile($fileguid);
- if($mvcfile) {
- $mvcfile->MoveTo(RDA_TEMP.File::getUniqueFileName($mvcfile->FileName,RDA_TEMP));
- }
- }
- ?>
- <script language="javascript" type="text/javascript">
- function CuteWebUI_AjaxUploader_OnQueueUI(list) {
-
- }
- function CuteWebUI_AjaxUploader_OnPostback() {
- }
- </script>
-
- <form id="form1" method="POST">
- <fieldset>
- <?php $this->uploader->Render(); ?>
- </fieldset>
- <input type="submit">
- </form>