473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

image upload and page refresh

Hello:
I am using SA-FileUp to enable members to upload their product
images
to my ISP sever. When member uploaded a new image file, the file name is
replaced with the member ID and the old file is then overwrited.

Here is the problem:
Member can uploaded new image at "Upload page" BEFORE viewing the new
image at the "Detail page" without any problem. However, when member 1st
viewed the image at the "Detail page" and then upload the new image at the
"Upload page", the whole page is blocked more than 1 minute and the browser
will only load the old image unless manually he/she has to manually reload
(netscape) or refresh (IE) the browser.

It should not be the bandwidth problem because I can upload diff image
(with any size) as long as I don't load the old image from the browser
BEFORE
upload the new image to the server. I think the problem is caused by
caching.
I already put expires=0 on both "Display" and "Upload" page but the problem
still exist.

<% Response.Expires=0 %>
<html>
<head>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>

vin=request("vin")
'response.write(vin)

Set upl = Server.CreateObject("SoftArtisans.FileUp")
upl.SaveAs "i:\pp\temp\" + session("rand_id") + ".jpg"
Set objImageGen = Server.CreateObject("softartisans.ImageGen")

response.write("i:\pp\temp\" + session("rand_id") + ".jpg")

objImageGen.LoadImage "I:\pp\temp\" + session("rand_id") + ".jpg"
' Check width of image
img_width=objImageGen.Width
if (img_width>500) then
objImageGen.CreateThumbnail 500,0,2
end if
'Save main image to i:/pp/carmart/photos
objImageGen.SaveImage 0, 3, "i:\pp\carmart\photos\" + vin + "-1.jpg"

'Save thumbnail to i:/pp/carmart/thumbs
objImageGen.CreateThumbnail 101,0,2
objImageGen.SaveImage 0, 3, "i:\pp\carmart\thumbs\" + vin + "-1t.jpg"
session("rand_id")=""
Jul 19 '05 #1
2 2847
> <% Response.Expires=0 %>

This is not enough.
http://www.aspfaq.com/2022

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #2
I tried
<%
pStr = "private, no-cache, must-revalidate"
Response.ExpiresAbsolute = #2000-01-01#
Response.AddHeader "pragma", "no-cache"
Response.AddHeader "cache-control", pStr
%>

didn't work, tried cache isapi thing as well, I have buffer turned on IIS so
tried setting it to false as well still no luck
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uO*************@TK2MSFTNGP10.phx.gbl...
<% Response.Expires=0 %>


This is not enough.
http://www.aspfaq.com/2022

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: dave | last post by:
Hello there, I am at my wit's end ! I have used the following script succesfully to upload an image to my web space. But what I really want to be able to do is to update an existing record in a...
6
by: Varun_789 | last post by:
hello friends, i am developing an application in which i want to upload an image from clients hard drive(local hard drive) to the server. i mean the application should provide the user with the...
0
by: Satish Appasani | last post by:
Hi: I have a ASP.NET form with Web layout which I've achieved using panels. In one of the tab I have a File control to upload Images. When I put a file in the file control and move to another...
3
by: Paul Johnson | last post by:
I have a web site that allows users to upload images. The problem is when an image is uploaded over the top of another image the user would have to press F5 to refresh the images and clear the...
6
by: Suraj Joneja | last post by:
Hi All, I've an image control on my ASP.net page. This displays an image named 'Logo.jpg' in the location '~\Images'. Another application can change this image. It can select any image and...
3
by: byrd48 | last post by:
Hi, I am developing a web site which allows users to upload and share photos. I have a datalist which lists the photos and has the usual edit, update commands. Within the edititemtemplate, I...
2
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but...
4
by: finecur | last post by:
I am working on the project. Here is the work flow. server. The server will do some calculation based on the data in the file and return an image in Jpg format. The returned image will be...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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
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...

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.