habieb
asked on
Catch error during upload
Hi,
I need help!
My application provide upload image to user.
The problem is there is an error..but I need to know what kind of error caused the uploading is failed
Below the script:
<cftry>
<cffile action="upload" nameconflict="makeunique" destination="#imagepath#" filefield="photo" accept="image/gif,image/jp g,image/jp eg,image/p jpeg">
<font face="arial" size="-2" color="red">File Uploaded</font><Br>
<cfcatch type="any">
<script>alert('File Cannot Be Uploaded\nNot An Image');</script>
<cfinclude template="menu.cfm">
<cfabort>
</cfcatch>
</cftry>
is there any solutions to trace the error during uploading using javascript?
I need help!
My application provide upload image to user.
The problem is there is an error..but I need to know what kind of error caused the uploading is failed
Below the script:
<cftry>
<cffile action="upload" nameconflict="makeunique" destination="#imagepath#" filefield="photo" accept="image/gif,image/jp
<font face="arial" size="-2" color="red">File Uploaded</font><Br>
<cfcatch type="any">
<script>alert('File Cannot Be Uploaded\nNot An Image');</script>
<cfinclude template="menu.cfm">
<cfabort>
</cfcatch>
</cftry>
is there any solutions to trace the error during uploading using javascript?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't know the error. if u look at the script, it occured because there're javascript alert.
<script language="Javascript">
alert("File Cannot Be Uploaded\nNot An Image");
</script>
I've no idea how to determine the error. cfcatch type=any: it may be any error.
How to determine things after uploading?.. the uploading was failed!!!..there's no file uploaded..I've checked my image folder each time after run the page.
which is correct?
the destination "E:\application\content\im ages"
or
destination E:/application/content/ima ges
<script language="Javascript">
alert("File Cannot Be Uploaded\nNot An Image");
</script>
I've no idea how to determine the error. cfcatch type=any: it may be any error.
How to determine things after uploading?.. the uploading was failed!!!..there's no file uploaded..I've checked my image folder each time after run the page.
which is correct?
the destination "E:\application\content\im
or
destination E:/application/content/ima
ASKER
I don't know the error. if u look at the script, it occured because there're javascript alert.
<script language="Javascript">
alert("File Cannot Be Uploaded\nNot An Image");
</script>
I've no idea how to determine the error. cfcatch type=any: it may be any error.
How to determine things after uploading?.. the uploading was failed!!!..there's no file uploaded..I've checked my image folder each time after run the page.
which is correct?
the destination "E:\application\content\im ages"
or
destination E:/application/content/ima ges
<script language="Javascript">
alert("File Cannot Be Uploaded\nNot An Image");
</script>
I've no idea how to determine the error. cfcatch type=any: it may be any error.
How to determine things after uploading?.. the uploading was failed!!!..there's no file uploaded..I've checked my image folder each time after run the page.
which is correct?
the destination "E:\application\content\im
or
destination E:/application/content/ima
ASKER
Hi, thanks a lot to both of u. I've already settled the problem. As Anand's suggestion..I've found on the destination..ok..
ok gr8 - so do i get points ???
heh :)
K'Rgds
Anand
heh :)
K'Rgds
Anand
ASKER
tanx anand..
<script language="Javascript">
alert("File Cannot Be Uploaded\nNot An Image");
</script>
if the error is javascript else check ur Menu.cfm file.
Regards,
Sandeep