1 (edited by lakilevi 2010-03-10 12:48:07)

Topic: post variables to upload.php, filters, error messages

Hello!
First of all I should say a big thank you for this cool application. It is well structured and easy to use. But also I would have some questions:
1. how can I send dinamicaly post variables to the uploaded file? Example the field values from a form.
2. I would not use filters, so I would allow all file extensions. How can I do this? if I delete the filters option, the engine let's me upload only images.
3. how can I display some messages for example if the file size is largen then required, etc?
4. if I set the filters to allow only images for upload, I can drag&drop into the filelist also other filetypes. Can this be solved also?

Thank you very much for your help.

Re: post variables to upload.php, filters, error messages

1) Use mutlipart and the multipart_params options.
2) Isn't it possible to just omit the filters? If not we should look into that file a bug report at GitHub.
3) Use various events and use something like jQuery or similar to display the messages.
4) Hmm, didn't know that you should never be able to drag in files that are not in the list. Please file a bug report on this as well.

Thanks.

Re: post variables to upload.php, filters, error messages

Thanks for your fast response.
I will generate a bug report.

Also I have another problem:
Can I somehow filter the max file number? I mean I want to let to upload only max 3 files. Can I set this somewhere?

Thanks

Re: post variables to upload.php, filters, error messages

You can add your own FilesAdded event handler that alerts the user that they have picked to many files and then just crop down the list.

Re: post variables to upload.php, filters, error messages

I don't know.. probably I make something wrong.
I have a simple form, with 3 fields and the pluploader for upload files. I want to submit these fields together with the files. I used multipart:true, but no realy effect. And at the moment I set multipart:true, he uploads files with 0 Kb size, and do not see any post variable.
How could I solve this? So a simple form submit and file uploading.

Thank you very much fro your help...

Re: post variables to upload.php, filters, error messages

2) i use filters:[] (empty) and works great (not yet tested with html4&5)

Re: post variables to upload.php, filters, error messages

Hi, I don't understand your answer to Lakilevi. He asked, how to display message if the file is too big. You wrote:  "Use various events and use something like jQuery or similar to display the messages."
Which events do you mean? Because no plupload event is fired when I want to upload bigger file than is allowed (using flash runtime).
Thanks

Re: post variables to upload.php, filters, error messages

I have now added error types for invalid file sizes and extensions. Also added the ability to skip using filters so if you don't specify if all files can be added.

9 (edited by pauls 2010-06-08 22:47:31)

Re: post variables to upload.php, filters, error messages

There are some great php / ajax apps for uploading that you could integrate, i don't think i would want silverlight since it requires people to have another plugin, thats why HTML5 is going to be great a standard that browswers support and you wont need plugins for videos etc. I run a bunch of custom scripts with my drupal cms and getting my development box ready for HTML5