Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Intermittent upload problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intermittent upload problem



Hi Nigel,

I can confirm that I get this problem too.
It only occurs on Safari (I'm using 2.0.4 (419.3)).
It's maddening isn't it?

Here's my upload form:
<form name="upload" action="/handleuploadphoto.php?imageid=<?php echo $imageUID; ?>" enctype="multipart/form-data" method="post">
<center>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php echo (2*1024*1024); ?>" />
<input name="imageFile" type="file" />
<span class="h3orange"><a href="javascript:upload();"><img src="/ images/orangego.jpg" alt="preview" /> upload picture</a></span>
</center>
</form>


Here's the upload() Javascript function:
function upload()
{
  document.upload.submit();
}

Sometimes it happens, sometimes it doesn't... it seems to be about 50% of the time at random.
I need to watch the network traffic to see where it gets stuck but my guess is Safari never sends anything to the server.


Cheers
Ian
On 16 Sep 2006, at 18:46, Nigel Gilbert wrote:

I have a web page (generated by PHP) that includes a file upload section.
Intermittently (about half the time), when I choose a file and press the
Upload button, Safari hangs and does not upload. More specifically, the
status line at the bottom of the web page says "Loading
http://www.epress.ac.uk/articles.php";, completed 4 out 5 items" and the blue
bar in the address field gets as far as 'http://', but nothing else happens
and I can wait for more indefinitely. If I then move to another page on the
site, return to this one, choose the same file, and click Upload, normally
the upload proceeds as expected. Moreover, I sometimes use Firefox and I
have never had this problem with this page using Firefox, which leads me to
believe it may be a Safari issue.


However, I don't know how I can track down the cause of this problem, as it
is intermittent. In case it helps, I am appending the first 50 or so lines
from a 'View Source' of the page in question.


Any clues about the source of the problem?

Nigel





<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
<title>EPRESS</title>
<link rel="shortcut icon" href="/src/images/favicon.ico"
type="image/x-icon">
<!--


    EPRESS electronic journal management system
    version 2.7
    written by Stuart Peters, University of Surrey
    and Nigel Gilbert, University of Surrey
    mailto: email@hidden
    (c) 1999 - 2000; 2003 - 6

-->
<script type="text/javascript">
if(window.history.forward(1) != null) window.history.forward(1);
</script>
</head>
<body link="#006666" vlink="#006666" alink="#006666">
<a name="authorupload"></a>
<p>
<font size="+1"><b>
<a
href="article_view.php?article_id=1021">2006:42:2</a> Cascades of Failure
and Extinction in Evolving Complex Systems</b>
</font>
</p>
<script type="text/javascript">
function squash_double_submits (form)
{
if(form.upload.value == 'Please wait. Uploading...') {
return false;
} else {
form.upload.value = 'Please wait. Uploading...';
return true;
}
}
</script>
<form method=post enctype="multipart/form-data" name=uploadauth
action="/src/article_files.php"
onsubmit="return squash_double_submits(this)">
<input type=hidden name=article_id value=1021>
<input type=hidden name=uploadtoauthorfiles value=true>
<input type=hidden name=rows value=3>
<input type=hidden name=MAX_FILE_SIZE value=16777216>
<table border=0 width="100%">
<tr><td colspan=3><hr noshade></td></tr>
<tr>
<td rowspan=6>
Upload files:
</td>
<td>
<i>to Author's files</i>
</td>
<td rowspan=6>
<input type=submit name=upload value="Upload!">
</td>
</tr>
<tr>
<td>
<input type=file size=40 name="authfile[0]">
<input type=hidden size=20
name="auth_newname[0]">
</td>
</tr>
<tr>
<td>
<input type=file size=40 name="authfile[1]">
<input type=hidden size=20
name="auth_newname[1]">
</td>
</tr>
<tr>
<td>
<input type=file size=40 name="authfile[2]">
<input type=hidden size=20
name="auth_newname[2]">
</td>
</tr>
<tr>
<td>
<i>to Referee file</i>
</td>
</tr>
<tr>
<td>
<input type=file size=40 name="referee[0]">
<input type= hidden size=20 name="ref_newname[0]">
</td>
</tr>
<tr>
<td colspan=3>
<hr noshade>
</td>
</tr>
</table>
</form>
<a name="prepare"></a>
<form method=post action='/src/article_files.php#prepare'>
<input type=hidden name=article_id value=1021>
<table width="100%" border=0 cellpadding=1>
<tr>
<td colspan=2><table border=0 width="100%">
<tr>
<td colspan=4>
<i>Author's files</i>
</td>
<td align=center>
<input type=image style="border: 0" src="images/ change.gif"
name="Change" value='Change'title="Unselect all files">
<input type=hidden name=copyflg value=copy>
</td></tr><tr valign=bottom>
<td align=center>
<a
href="http://www.epress.ac.uk/JASSS/files/2006.42.2/ paper_JASSreviseaug06_AH
.doc" target="_blank"><img src="/src/images/word.gif" border="0"
alt=""></a></td>
<td width=300>
<a
href="http://www.epress.ac.uk/JASSS/files/2006.42.2/ paper_JASSreviseaug06_AH
.doc" target="_blank">paper_JASSreviseaug06_AH.doc</a> </td>
<td>28-Aug-2006 14:42</td>
<td>178 Kbytes
<input type=hidden name="file[0]"
value='/Volumes/Documents/VirtualSites/epress/JASSS/files/2006.42.2/ paper_JA
SSreviseaug06_AH.doc'>
</td><td align=center>
<input type=checkbox name="copy[0]"
title="Select this file to copy"checked></td>
<td>
<a
href="download.php?link=/files/2006.42.2/ paper_JASSreviseaug06_AH.doc"><img
src="/src/images/download.jpg"
border=0 width=11 height=14 alt="Download"
title="Download file to PC"></a>
</td>
</table>
</td>
</tr>
<tr>
<td>
<br>
</td>
<td align=right>
<input type=submit name=docopytorefereefiles
value="Copy to referee files">
</td>
</tr>
<tr>
<td>
<br>
</td>
<td align=right>
<input type=submit name=docopytoworkspace value="Copy
to editor's files">
</td>
</tr>
</table>
</form>
________________________________________________________
Nigel Gilbert ---- epress, the journal management system
http://www.epress.ac.uk email@hidden
tel: +44 1483 689173 fax: +44 1483 689551



_______________________________________________ Do not post admin requests to the list. They will be ignored. Web-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Web-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Intermittent upload problem (From: Nigel Gilbert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.