Don't show thumbnail in upload file use primefaces - jsf

I want don't show thumbnail when i upload images. How can i remove it ?
Example : https://lh3.googleusercontent.com/-nWDNS4695Lg/UtTy3-c9y2I/AAAAAAAAArY/USGOIL43Iyg/w979-h314-no/Capture4.PNG (sr, i can't show image in here)
Anymore, i want just upload one image in one time. Clearly, when i choose file A (not click upload or cancel) and then i choose file B, i want replace file B to file A (Panel upload file just show final file choose, file B). How can i do that ? Follow example picture, it just show $RBLX1U4.jpg to upload or cancel

you just use
<p:fileUpload value="#{bean.file}" mode="simple"/>
It allows only single file upload without thumbnail of the doc.

Related

upload a file on a page with multiple option (button)

when we have multiple button to upload on a page , I want to upload a file for the 2nd one,we I try to upload so it just upload on the first option.
#browser.file_filed(:type => 'file').set 'path'
upload_button1 upload_button2 upload_button3

Dropzone show only CSV & XLS files in dialog box

I used dropzone as CSV/XLS file uploader. I use this option to filter and restrict CSV/XLS file:
acceptedFiles: "text/csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
Now I just see XLS file in windows dialog box and doesn't see CSV file. Off course when I change filter drop-down to all files, I see CSV file and select it. But I wanna to method or option to solve this issue.
Do you have any solution for see both XLS/CSV files together?
Dropzone.js simply puts the values from the AcceptedFiles attribute directly into the html component.
<input accept="text/csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
It looks like text/csv is not an accepted value even though it is a valid mime type. .csv is recommended.
See here HTML Input="file" Accept Attribute File Type (CSV).

Node.js how to download webp image

It´s very easy to download images via the request module. But this is only working for me when then end of the url contains .jpg or .png
But how can you download as example this image?
https://lh3.googleusercontent.com/VpoWDgQ2I_RlTNM1Srlo5Q0VQglr-gdbzJ48TwYRXM2U4iF75PMrv76rBiu5c3l1UJs=s180-rw
Does anybody know a method to download the image as .jpg?
I found a solution on howtogeek
"Click the URL bar, delete the last three characters in the address (the “-rw”), and then press “Enter.” The same image will be displayed again, but this time it’s rendered in its original format, usually JPEG or PNG."

Recognised file types for image preview?

Is it possible to add additional file types to be recognised as images and thus trigger automatic creation of an image view when a resource is uploaded?
SVG files will preview in CKAN, but we have to manually add the image view e.g.
https://datastore.landcareresearch.co.nz/dataset/novel-yeasts-from-new-zealand-forests/resource/3812ee6b-dd45-45c9-b425-6a18375e5727
With text (for example) we can specify file format extensions to recognise as text and automatically create a text preview (ckan.preview.text_formats...). Is there an equivalent for images?
Thanks
It would only be possible by modifying the source code for your instance:
https://github.com/ckan/ckan/blob/master/ckanext/imageview/plugin.py#L9
Seems like a great idea to have the image view on a par with the text view in this regard, so I made a pull request:
https://github.com/ckan/ckan/pull/3380

Xpages fileupload control and mime types

I have a problem uploading an image to a form field using the built in xpages fileuploader control. The form field the image is saved to is configured like explained in this blog post by Mats Knutsen: http://devxpages.blogspot.com/2011/03/display-picture-from-rich-text-field.html . I Also plan to display the image in an xpage using the template described in the blog post, like this (http://server/MyDatabase.nsf/viewunid/docunid/imageField/M2?OpenElement).
I know my fileuploader control points to the correct field in the form, since i can see the image in the document using the Lotus Notes Client after the document is created. However; the picture can not be viewed using "http://server/MyDatabase.nsf/viewunid/docunid/imageField/M2?OpenElement" at this point.
On the other hand, if I delete the field contents (the image) from the document field in the client, go back to the xpage with the fileuploader control, and uploads the image a second time, it works perfectly, and the image can be viewed using the url mentioned above.
When I access field properties after the first upload, the Data Type of my field is set to Rich Text.
The second time I upload the same image to the same field in the same document, the field properties Data Type is set to MIME Part, as it probably should have gotten the first time around as well.
Does anyone know why my file uploader control does not work the first time i upload the image, but when I edit the docuement and upload the image a second time, everything seems to be ok?
I would try to avoid uploading images into the RichText in the first place. Would it break your application if you resort to uploading the image as a regular attachment? You then can reference it using .../$File/imgfilename.jpg (using the file name used during upload - retrieved by #AttachmentNames)

Resources