1

I am using prime faces file upload feature in my application form, whenever i upload the file it is not displaying the preview image in screen.

I would like to know which attribute and class to refer for this issue. please find the sample code below.

<fileUpload id="uploadImage" fileLimit="1" fileUploadListener="#{publicSarFormDataBean.handleFileUpload}" process="@form" mode="advanced" multiple="false" auto="true" onstart="PF('statusDialog').show()" oncomplete="PF('statusDialog').hide(), PF('documentListTbl').filter()" dragDropSupport="true" sizeLimit="1000000000" allowTypes="/(\.|\/)(png|jpeg|JPEG|jpg|JPG)$/" invalidFileMessage="File is invalid" update="messages" styleClass="Fleft FontBold"> </p:fileUpload> 
6
  • 1
    please put more code, you want to show the image in datatable?? Commented May 30, 2017 at 16:18
  • Normal form .It contains text field and submit button Commented May 30, 2017 at 17:08
  • you want to see an example with croping? Commented May 30, 2017 at 17:24
  • 1
    put you p:graphicImage code... Commented May 30, 2017 at 17:35
  • Even better, create a minimal reproducible example Commented May 30, 2017 at 22:24

1 Answer 1

2

The 'preview' is only relevant before uploading. And since you have auto="true" the files are automatically uploaded and a preview in the p:fileUpload is useless.

It is all working fine in the PrimeFaces upload showcase

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.