Persits Software, Inc. Knowledge Base Articles

Nothing has been posted error

Problem Description

When using AspUpload, the line of code

Upload.Save "c:\upload"

generates the following error:

Persits.Upload.1 error '800a0003'
Nothing has been posted.

Solution

This error means that your upload script contaning a call to Upload.Save (or SaveVirtual/SaveToMemory) is invoked directly, rather than via a <FORM METHOD="POST">. As a result, no data is POSTed to the script, hence the error.

1. If your upload form and upload script are in two different files, make sure your <FORM> tag contains the attribute METHOD="POST".

2. If your uploadform and script are in the same ASP file, you may use the property IgnoreNoPost to prevent this exception to be thrown when your script is called the first time, as follows:

<%
Set Upload = Server.CreateObject("Persits.Upload")
Upload.IgnoreNoPost = True
Upload.Save "c:\upload"
%>

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