The mentioned issues look like environment problems (like IE8 & PDF issue), and not issues of rich:fileUpload component itself. Uploading files to the server is the only functionality of the component. So, can you please clarify if you have problems with the upload itself (e.g. data is broken while uploading, listeners are not called, etc.) or no?
I also saw that a required fix has already been addressed as an enhancement but nothing is said as far as the date it will be released. In the mean while, being it a common problem, I hope that someone has already dealt with it and found a solution.
Can you give a link to this enhancement?
Hello Nick, in my mail I refer to problems with the a4j:mediaoutput component.
Rich:fileupload is just used to upload data to the server. Then the mediaoutput provides file preview after uploading.
Tht said this is the code: It's partly taken from the online demo changing the element attribute to object and the mimeType to application/pdf.
value="#row" createContent="#(FileUploadBeanBean.paint}"mimeType="application/pdf" id="pdf-preview" cacheable="false"
session="true" width="300" height="300" />
</a4j:mediaOutput>If you try to run the onlinerich:fileupload demo with ie 8 and modify the code as shown above to render pdf files it does not work. The preview shows a red box for pdf files. It works with firefox. Setting classid does not work either.Moreover if you set the useflash flag for the rich:fileupload componet in order to allow multiple selections ( users are bored of constantly opening the file upload browser many times) pdf preview does not work any more neither on firefox.You can easily reproduce these behaviours on your machine. I tried on several client machines and the result is the same.Moreover there's no way to open office documents with the mediaoutput component.If you succed in making these things work, please give me the code so that I can try it.
so the problem not in upload itself but in displaying PDF. check please this dev sample. It was used to check PDF files output.
I'll try your sample and let you know.
Consider that your sample is enough simple and points to a static file name.
I think that I should try with something more dinamic to see if it really works.
May you please try the rich:fileupload demo with pdf files correcting just some things as already stressed (and that you know better than me :-) ) and check the behaviour of the mediaoutput component witt pdf files when the use flash option is setted?
Have you got some information as far as showing office documents in mediaoutput is concerned?
Is it possible that noone has ever had this problem?