Intermittent problem with temporary file directory not being available

  •  08-02-2010, 10:52 AM

    Intermittent problem with temporary file directory not being available

    I'm using the Ajax Uploader, automatic upload not manual.  Occasionally users get a message that says:
     
    Unable to find the uploaded file in directory: E:\....\UploaderTemp
    - (at that point on the screen, the progress bar is sitting at 100% and Cancel button is still showing)
    - (UploaderTemp is the temp file directory listed on the CuteWebUI:Uploader control:
    tempdirectory="~/UploaderTemp")
     
    The theory here is that because we have load balancing turned on on our servers, that the upload to the temp file directory works, goes to the UploaderTemp directory on that server, then the File Uploaded event takes place in another thread which goes to a different server, goes to find the tempfile to save it into our database and can't find it in the /UploaderTemp directory on that  other server. 
     
    Could that be what's happening, based on the way the Ajax Uploader works?
     
    You gave me in another post, a link to the sequence of events: 
    http://cutesoft.net/forums/post/56964.aspx
     ---------------------------------------------
    Rob Nagel ,
     
    the order of the events are :
     
    client side select multiple files
    client show file1 uploading
    server fire FileValidating event
    client show file1 finish
    client show file2 uploading
    server fire FileValidating event
    client show file2 finish
    ...
    client side fire Postback event
    server side fire FileUploaded event for each file
    server side fire UploadCompleted event
     
    If you move/delete the temp file in FileValiding event, the FileUploaded of that file will not fire.
     
    So you can resize the image , but please keep the filepath , and then move it in FileUploaded event.
     
    Regards,
    Terry
    ----------------------------------
     
    So this looks like  there's a postback between the upload of our one file and the FileUploaded event that saves the temp file.  Is that true?
     
    Is there anyway to  process the uploaded file in the same thread that receives the file so we're guaranteed to still be on the same server?
     
    Thanks,
    Debbie
View Complete Thread