Home     Products      Support      Corporate     Sign In 
Support Knowledge Base, Article 219
XFile reports a successful transfer but the file is not found on the server
XFile is a client-side control and therefore only inherently has access to information from the client machine.  If XFile reports a successful transfer, this means it has completed its job of posting data to the server.  However, it cannot know what happened to the file after it was received by the server.  If an error occurred on the server-side processing of the file, Xfile will not tell you about it unless you specifically ask the XFRequest object for it's Response property.  This property captures the response from the server.

There are a number of possible reasons why the file would not be found on the server after a successful transfer by XFile:

  • In the server-side upload processing page, the upload path was set incorrectly and the file ended up somewhere other than where you intended.
  • There was a permissions error when attempting to cache or save the file.
  • Some other server-side error occurred during the execution of the upload processing page.

To isolate the problem, try some or all of the following steps.

  • Carefully examine your upload processing page and make sure there are no errors in the code.  (for example, make sure the path is spelled correctly and that you have not tried to set the Path property dynamically from the form or after referencing a form element.  See Knowledge Base article #8)
  • To isolate the problem from XFile, try uploading a file from a regular HTML form and posting to the same processing page.
  • Make sure that the NTFS permissions are correct for the upload directory on the server (Read/Write/Delete for the anonymous or authenticated user accounts).
  • Use XFile's Response property to display the response from the server and get detailed error information

    If doing an ASP file transfer with the XFRequest object - after calling Xfile's start method, you can write:

    <% Response.Write  [XFRequestObject].Response %>

    If using XFile in client-side script on an html page:

    Put a <span> tag in the section of the page where you want the results to be displayed, as follows:

    <Span ID="ResponseText" Name="ResponseText"></Span>

    Then, in your client-side script, after you call XFile's start method, assign the value of the response property to the InnerHTML of the span tag.  If you are using a separate progress window, you will need to to send the response to this span tag from the progress page, where you call XFile's start method. 

Inside the attached XFile_Response.zip are two samples.  The sample in  XFile_ASP_Response.zip  uses the XFRequest object in  an ASP page and displays the response using Response.Write.  The sample in XFile_HTML_Response.zip uses the visual active-X object in an HTML page, puts a <span> tag in the html page and sends the response to this span tag from the callback() sub in the progress page.

Created : 12/1/2002 12:00:00 AM (last modified : 11/2/2001 2:00:00 PM)
Rate this article!