My problem is rather quite simple to explain. I use
Code: Select all
p:fileUpload
Code: Select all
allowTypes="/(\.|\/)(gif|jpe?g|png$/"
Code: Select all
p:fileUpload
Code: Select all
allowTypes="/(\.|\/)(gif|jpe?g|png$/"
Code: Select all
/i
Patch for the same sent to PrimefacesThe problem in the file \META-INF\resources\primefaces\fileupload\fileupload.js Preview images are only available for png, jpg and gif files and for this there is a check:
and pattern:Code: Select all
//preview if($this.isCanvasSupported() && window.File && window.FileReader && $this.IMAGE_TYPES.test(file.name))
As you can see in this place lacks the flag for case insensitive validation. So i manually add this flagCode: Select all
IMAGE_TYPES: /(\.|\/)(gif|jpe?g|png)$/
and preview started working as it should.Code: Select all
IMAGE_TYPES: /(\.|\/)(gif|jpe?g|png)$/i
Users browsing this forum: No registered users and 56 guests