473,511 Members | 16,260 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reloading image after upload

258 Contributor
Hi everyone
I have a script which lets users upload their own thumbnail.
The users photo gets resized to 50 x 50 pixels when the upload is finnished.

But the problem is that when the user uploads and changes the thumb the new image is not loaded by the browser and it still shows the old one until the user refreshes the page.

This happens because I use the same image name for thumbs. For example if users ID on the database is 53 the thumb name will be 53.jpg

I know it would work if I change the file name each time the user uploads the file but the website is now up and runing so its almost impossible to change all of these images.

Is there any way to reload the image when the user uploads a new photo?


Any suggestions will be appreciated

Thanks / Behzad
Jun 21 '10 #1
2 1645
HaLo2FrEeEk
404 Contributor
Well what's happening, I think, is the image is being saved into the user's cache. Let me clarify, your user uploads an image of an arbitrary size, say 115x115, and your script resizes it to 50x50 for them? Well, is the 115x115 (original) image ever displayed to the user? Is it ever shown in it's original form? If it is then you need to avoid that, if not then there's no reason that it should be cached by the client's browser.

I need a little more information before I can totally understand this.
Jun 21 '10 #2
bnashenas1984
258 Contributor
Thanks HaLo2FrEeK for the quick reply.
The original photo is never showed or even saved anywhere. I save the resized image in a folder then I show it next to the users name. (when logged in)

I'm not sure if I can post a link to my website here..
Anyways, If I'm not moderators will remove it
Here is the link to my website you can take a look :
http://www.moviesflood.com/

My script works fine but the only problem is that the browser caches the image and the page should be refreshed to show the new image.

As I remember there is some kind of HTML or JAVA script to reload the image but I don't know how.

Thanks again
Jun 21 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
2437
by: DH | last post by:
I have a "file upload form" that works OK, but I have been unsuccessful in my attempt to also resize the uploaded .JPG (if it is too wide), over-writing the original .JPG, and then create and save...
0
2352
by: Paul Hamlington | last post by:
Hello, I've been programming in ASP for a little while now and quite an advanced user, but I have come across an unusual problem in which I need assistance. I have built my own image upload,...
2
4151
by: Faree | last post by:
Hi, I am a PHP Developer.can any one help me on image upload and display of that image.what i want is uploading an image to a directory ,displaying of that image as a thumbnail.when i...
3
2033
by: Michael | last post by:
Hello, I want to write a componant that helps a user upload an image or file. I want something like you see on yahoo's image upload page. It has to work on mac and windows. Can anyone help me get...
1
2246
pritipshah
by: pritipshah | last post by:
Hi All, I am using vtiger open source CRM and in that they are using FCKeditor for Image Upload (Resource browser window) but it is not upload or make new folder for image. Vtiger CRM...
7
17035
by: mishrarajesh44 | last post by:
hii all Truly telling i hav got this code from net & i am finding error while running the code below.. code:- <?php $idir = "photo/"; // Path To Images Directory $tdir =...
7
3719
by: dragiton | last post by:
SA Upload SQL Database variable types (image upload and storage) I am having trouble with the SA Upload utility. The following code used to work correctly. However, I lost my database and had to...
3
1883
by: Bill H | last post by:
I have written many programs for file / image upload over the years in perl, but know that I am working more in php I find I need to be able to do it in php now. I was gonna just do a google serach...
1
4862
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop...
26
2345
matheussousuke
by: matheussousuke | last post by:
May someone help me correct this script? there a few ' and " and ; in the wrong places: <?php include "./comm.inc"; connectdb(); $sql = "SELECT imgid,imgtype FROM...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5063
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.