473,396 Members | 1,726 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,396 software developers and data experts.

Chiisoft ASP - Chili!Upload problem.....

Hi,

i'm using a Chilisoft ASP component - Chili!Upload

I have a form as such:

___________________________

<FORM ACTION="getfile_lnx.asp" METHOD="POST" ENCTYPE="multipart/form-data">

<INPUT TYPE="FILE" NAME="FILE" size="70">

<INPUT TYPE="SUBMIT" VALUE="Upload">

</FORM>

___________________________

This is then submitted to :

Set fbase = Server.CreateObject("Chili.Upload.1")

Response.Expires = 0

fbase.SizeLimit = 500000

fbase.AllowOverwrite = false

fullpath = fbase.SourceFileName
____________________________

If the user presses the upload button without first selecting a file I get an error:

Chili.Upload.1 error '80020009'

Filename is empty. No file was selected
However I try to catch this error, I just cannot.

Please can you help me get around this.
Thanks
David
Jul 19 '05 #1
5 2995

"David" <da***@scene-double.co.uk> wrote in message
news:c1**************************@posting.google.c om...
Set fbase = Server.CreateObject("Chili.Upload.1") If the user presses the upload button without first selecting a file I get an error:
Chili.Upload.1 error '80020009'

Filename is empty. No file was selected

Does this object have a count property or a count property of a files
collection or something?

Response.Write fbase.count
Response.Write fbase.files.count

I'm just guessing about this. I'd imagine this this is covered in the
documentation for this component. Have you checked there for a count
property? Or perhaps if not, there's a filesize property that you can check
to see if it's <= 0. It appears the documentation is here.
http://docs.sun.com/source/817-2514-...icePack68.html

Ray at work
Jul 19 '05 #2
Ray,

Thanks for your reply,

I have tried testing against the following by saying if the size = 0 or
filename = "", but still nothing works.

Chili!Upload FileSize Property (Read Only)
and
Chili!Upload SourceFileName Property (Read Only)

I just cannot trap the error ?

Do you know anyone who has managed this.
Thanks

David


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
No, I don't know anyone who's using Chilisoft stuff and that virtual ASP
thing. Does Chilisoft support On Error Resume Next?

Ray at work

"David Gordon" <da***@scene-double.co.uk> wrote in message
news:er*************@TK2MSFTNGP12.phx.gbl...
Ray,

Thanks for your reply,

I have tried testing against the following by saying if the size = 0 or
filename = "", but still nothing works.

Chili!Upload FileSize Property (Read Only)
and
Chili!Upload SourceFileName Property (Read Only)

I just cannot trap the error ?

Do you know anyone who has managed this.
Thanks

David


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #4
"David" wrote:
: <FORM ACTION="getfile_lnx.asp" METHOD="POST"
ENCTYPE="multipart/form-data">
: <INPUT TYPE="FILE" NAME="FILE" size="70">
: <INPUT TYPE="SUBMIT" VALUE="Upload">
: </FORM>

: This is then submitted to :
: Set fbase = Server.CreateObject("Chili.Upload.1")
: Response.Expires = 0
: fbase.SizeLimit = 500000
: fbase.AllowOverwrite = false
: fullpath = fbase.SourceFileName

: If the user presses the upload button without first selecting a file I get
an error:
: Chili.Upload.1 error '80020009'
: Filename is empty. No file was selected

Try:

<script type="text/javascript">
function validate() {
if(document.forms[0].elements[0].value=="") {
alert("No file to upload.\nPlease browse and select a file before
trying to upload.");
document.forms[0].elements[0].focus();
return false;
} else {
document.forms[0].submit();
return true;
}
}
</script>
</head>
<body>
<FORM ACTION="getfile_lnx.asp" METHOD="POST" ENCTYPE="multipart/form-data"
onSubmit="return validate()">
<INPUT TYPE="FILE" NAME="FILE" size="70">
<INPUT TYPE="SUBMIT" VALUE="Upload">
</FORM>

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 19 '05 #5

Ray,
Nice one,
I would have never thought of using 'On Error Resume Next'.
I tried it, changed my code around and voila... !

Have a drink on me....Thanks again.

David
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #6

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

Similar topics

23
by: Mark Parnell | last post by:
I'm relatively new to PHP, and have just converted a site from ASP to PHP. There is one thing I haven't managed to do, though. When the site was using ASP, I had one file (called variables.asp),...
3
by: Chris Fortune | last post by:
# uname -a Linux stargate.mxc-online.net 2.4.20-021stab022.2.777-smp #1 SMP Wed Jul 28 17:12:37 MSD 2004 i686 i686 i386 GNU/Linux I recompiled PHP with mcrypt, openssl, and curl phpinfo():...
1
by: David P. Jessup | last post by:
My Web Hosting company runs Sun ONE Active Server Pages, without the SpicePack. So that means I do not have use of CDO or CDONTS. Since they run Apache I do have access to linux sendmail...
3
by: Jmac | last post by:
Can Chili handle Microsoft databases? I inherited a site with ASP, but my host uses Chili and the site is generating errors. Advice appreciated. Thnx Jmac
6
by: Chris Cameron | last post by:
Is it possible to run ASP scripts, on a windows server but without using IIS as the webserver? I'm not interested in things like Chili-Soft, but would like to run ASP the same way IIS does...
1
by: Greg Steele | last post by:
Does anyone have a copy or know where I can get an installation executable for chiliReports 2.0 from chili! soft? The company I'm working for bought a copy several years ago, then moved their...
2
by: mark | r | last post by:
a customers host runs linux and theyve installed chilliasp to cater for our asp pages... only we cant get it to connect to our access databases. see http://www.rmltd.co.uk/news.asp for the test...
9
php
by: GoGs | last post by:
i'm a newbie to PHP, just starting of. i've got a couple questions, and i would be very thankfull if you could answer them in details... 1. how can i find out if my server supports PHP? all i...
24
by: Alan M Dunsmuir | last post by:
What is the command (in Windows Forms VB.NET) which will cause the subject computer's default browser to launch, and display a specified Web page? -- Alan M Dunsmuir
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
0
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,...

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.