473,586 Members | 2,472 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 1652
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
2447
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 a thumbnail.jpg .... all at the same time. Links to a working example would be appreciated. Thanks.
0
2366
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, I have two versions of the binary to string conversion one fast, one slow because some servers use chillisoft and therefore the append function in...
2
4156
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 click on that image the image should be diplayed in another page. I wrote code for image uploading and as well as display code.but i failed in...
3
2039
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 started? Is there any sample code? Thanks, Michael
1
2252
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 fource to use IE for better performence so from the first day i was using IE7 for editing and testing. After some time today i tried it with Mozilla...
7
17048
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 = "photo/thumbs/"; // Path To Thumbnails Directory $twidth = "125"; // Maximum Width For Thumbnail Images
7
3726
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 rebuild. Does anyone have any suggestions on what I may have wrong. I am not sure if I built my table to store the picture id's correctly. Maybe a...
3
1888
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 on how it is done in php, but I though it would be wiser to ask the members of this group how they accomplish it instead of relying on the top most...
1
4872
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 program,which can upload many file in folder.problem is,am unable to save my file name in to database.because i used same name for all input file type as...
26
2366
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 tblimage ORDER BY imgid"; $result = @mysql_query($sql) or die(mysql_error());
0
7915
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7841
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8339
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7965
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2345
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 we have to send another system
0
1184
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.