Advice on how to tackle this task (and cancelling S3 uploads)

Oct 29, 2008 at 7:54 AM
Hey there,

Firstly, nice upload tool.  Am just figuring out how to use it.  I've got a couple of questions:

1) I'm wanting to use this control to upload files when I click on a submit button elsewhere on the page (i.e. not in the Flajaxian control)?  When I click the submit button, the uploads will fire and, once complete, return a list of filenames that got uploaded, so I can write them to a database along with other info on the page.  Some tips on the appropriate workflow for doing this with the Flajaxian control would be most appreciated.

2) If I'm uploading to S3 using the AmazonUploaderAdapter, does the cancel button still work?  I'm just messing about with this on my local machine at the moment, but when I click Upload I notice the file moving to S3 in my web traffic monitor.  If I navigate from the page or click cancel, this traffic doesn't stop immediately.  Any tips for how to cancel this, and then notify my page that the file hasn't gone. 

Thanks, Steve
Nov 11, 2008 at 6:26 AM
Can anyone on this forum offer some advice on this question/task? 

With version 2 of Flajaxian coming out with the ability to have postback requests, does this change things at all? 

Nov 11, 2008 at 8:41 AM
Postback is because many asked for that. By default it is turned off as it will increase the load.

To trigger upload on the client side use JavaScript code:


To save to DB

<script runat="server">
protected void FileReceived(Object sender, FileReceivedEventArgs e){
    string fileName = e.File.Name;

<fjx:FileUploader ID="FileUploader1"  OnFileReceived="FileReceived" runat="server">
      <fjx:FileSaverAdapter Runat="server" FolderName="UploadFolder" />
      <fjx:ThumbGeneratorAdapter Runat="server" MaximumWidth="200" MaximumHeight="200" />
Jan 14, 2009 at 3:09 PM

Can you please be more specific or provide more instructions on how this is done. I am trying to do the same...Upload a file with some other elements on the form, save it to database and then load a gridview with the details just uploaded. All are in an update panel. I can use the OnFileReceived="FileReceived" and then in my code-behind page in the FileReceived method after saving the file and loading the gridview, I try doing updatepanel.update, but cannot refresh the contents. I have one more question. Can validation be used with the fileupload control. For example, I have 3 textboxes and all are required, also the upload file cannot be empty, can this be achieved. I would appreciate your help.\