I'm developing a JSF application which has an image upload function. I'd like to display the uploaded image. The uploading works fine but when I delete the uploaded picture and upload a new one, the old one is displayed in the browser. I typed the link of the picture in the browser but I sill get the old one. I use the same file name and I would not like to change it. How could I refresh it. (without Javascript). I'm using Glassfish Server. (Redeplyoing the application I get the new picture but it isn't a solution for an online system ;))
Thank you.
Redeplyoing the application I get the new picture
Don't store it in the deploy folder by getRealPath() and consorts. Store it outside the deploy folder.
See also:
Uploaded image only available after refreshing the page
Related
I have recently inserted some images into a google data studio report using both image from computer and by url (on a public domain) as graphics to make it more visually appealing.
When we duplicate the report, all of the data sources are ok but the report looses the images. It looses them even if they are hosted on a public web server accessing by https://
When I click on the image, it shows the image url in the property tab, but on clicking the button with the url it asks to upload from computer.
Is there a way to have images in the report and be able to duplicate whilst not loosing the linkage or do i need to replace the images every time.
We have tried
Uploaded image from computer
hosted image on https:// publicly accessible domain
used embeded url object to images on https:// publicly accessible domain
I just added an OpenGraph image to a site I'm working on and using the FB Debugger the info retrieves the correct image, however when sharing the url I still see default images being displayed (there was no specified OG image before). Is there something I'm missing here? The site uses a custom Python based framework and image is served via gzip from an Amazon EC2 instance, if that would affect the output in any way.
The problem is not with your website.
Facebook takes some time to refresh images inside facebook.com even though you can see the changes on Facebook Debug Tool.
In order to view your new image inside Facebook you can do two things:
Manipulate a little the URL you are trying to share, this way
Facebook will fetch the open graph data again.
Just give it some
time, it will be refreshed after a few hours.
There are three way to change your image you need to clear the
1) Manually clear facebook catch using the https://developers.facebook.com/tools/debug/ facebook tool
2) Add version code end of the url like ?v=1
3) write the GraphAPI code from when you click on the share button it will clear the facebook page cache.
I am using parse.com as a data storage backend for one of my web app.
I want to upload images on parse.com and I was successful in uploading images to parse.com and parse is returning a long unique URL for uploaded image as well.
When I tried to open the image using returned URL, image was opened which means upload was successful.
However I am not able to see uploaded images in parse.com file browser. Can someone suggest how to view all uploaded images in file browser?
Thanks
The only way to view these files is to download them and then view them locally. To do this you must do the following.
In the Parse data browser, navigate to the file cell.
Click on the cell, and choose a download location.
Open the file on your local machine.
Note: The file you download won't have an extension so you might have to specify the application you want to open the file. In your case it would be an image viewer.
I'm developing a simple websit, where user can upload and edit their profile
picture. I have implemented it. That is user can browse and upload his new
photo as profile picture. Now at this stage i want to add one more facility.
Whenever the user browses a photo, the new photo should be shown (he then
can upload it if wishes). For example I have the following UI :
So whenever the user browses a new photo say for example mango.png, the
new picture(picture of a mango ) should be shown instead of that blank picture.
I do not have any idea how to do that. I seached it in internet but the only think
i am getting is how to upload any image. So how can do that. Anyone ???
You can use JavaScript to send the image file automatically when the user selects an image in the CommonDialog file browser. For an example code have a look at this question:
How do I auto-submit an upload form when a file is selected?
If you want the users to be able to check the image before they decide to make it their profile picture: Let the form upload the file (temporarily) but don't set it as a new profile picture immediately. Finally, if the user sends another form ("Yes, apply new profile picture!"), your script could take the previously uploaded temporary image file and perform the database operations needed to make it the new profile picture.
I tried upload image with CKEditor form ASP.net server and send image to upload with PHP in another server.
That's work for upload image but the image didn't show on editor.
Please could you help to solve this problem.
You can't use different servers due to cross-site scripting protection by the browser. Check this sample: http://cksource.com/forums/viewtopic.php?p=46715#p46715