Fórum
Primefaces ImageCropper and FileUpload
Odysseas Doumas, modificado 7 Anos atrás.
Primefaces ImageCropper and FileUpload
New Member Postagens: 17 Data de Entrada: 22/06/16 Postagens Recentes
I need to implement a custom portlet using primefaces where someone can upload an image, crop it and then save it.
For the upload part i save the (temporary) image using TempFileUtil.
Can someone explain to me what value should i use inside the "image" attribute of the primefaces ImageCropper . I tried using :
For the upload part i save the (temporary) image using TempFileUtil.
fileEntry = TempFileUtil.addTempFile(groupId, userId, fileName, tempFolderName, inputStream, mimeType);
Can someone explain to me what value should i use inside the "image" attribute of the primefaces ImageCropper . I tried using :
String previewURL = DLUtil.getPreviewURL(fileEntry, fileVersion,
themeDisplay, queryString, appendVersion, absoluteURL);
but of course it didn't work. i can succesfully use this URL to view my image, but ImageCropper always returns a java null error. Has someone else used ImageCropper to give me a hint?
Kyle Joseph Stiemann, modificado 7 Anos atrás.
RE: Primefaces ImageCropper and FileUpload
Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
Hi Odysseas,
Which version of Primefaces are you using? p:imageCropper was broken in portlets until PrimeFaces 6.0 due to Primefaces Issue 1248.
- Kyle
Which version of Primefaces are you using? p:imageCropper was broken in portlets until PrimeFaces 6.0 due to Primefaces Issue 1248.
- Kyle
Odysseas Doumas, modificado 7 Anos atrás.
RE: Primefaces ImageCropper and FileUpload
New Member Postagens: 17 Data de Entrada: 22/06/16 Postagens RecentesKyle Joseph Stiemann:
Hi Odysseas,
Which version of Primefaces are you using? p:imageCropper was broken in portlets until PrimeFaces 6.0 due to Primefaces Issue 1248.
- Kyle
First of all, thank you for the quick response.
I am sorry for wasting your time, i didn't correctly set the initial coordinates which resulted to a null exception. Feel free to delete this thread.
Kyle Joseph Stiemann, modificado 7 Anos atrás.
RE: Primefaces ImageCropper and FileUpload
Liferay Master Postagens: 760 Data de Entrada: 14/01/13 Postagens Recentes
No time wasted Thanks for posting your solution! Perhaps it will help other p:imageCropper users if they see a similar error.
Thanks for using Liferay Faces!
- Kyle
Thanks for using Liferay Faces!
- Kyle