automatic upload

Feb 23, 2009 at 1:47 PM
is it possible to start upload as soon as you browse the file instead of clicking the upload button?
secondly, is it possible to remove cancel button?

Coordinator
Feb 24, 2009 at 3:26 PM
Edited Feb 25, 2009 at 4:54 AM
See below ...

Remove Cancel button:

<fjx:FileUploader ID="FileUploader1" runat="server" 
    CancelButtonX="-200"
    CancelButtonY="-200"
    >
</fjx:FileUploader>
Feb 24, 2009 at 4:37 PM
WoW! I have seen so many of the upload controls. Expensive but crap with flexibility.
Look at your control, you can almost do anything with it and its FREE!

I cant thank you enough.
Feb 24, 2009 at 4:41 PM
One more thing just as a suggestion for your future versions.
It would be nice if we can have a list of uploaded files on the top of the control
which I can know you can get through javascript but would be nice to have the ability to
delete the files after they have been uploaded.

Feb 25, 2009 at 4:05 AM
pessi, flajaxian -

I have to do the same thing - and I copied the javascript verbatim.  Here is my FileUploader using my custom adapter...

        <fjx:FileUploader ID="FileUploader1" JsFunc_FileStateChanged="FileStateChanged" MaxNumberFiles="1" runat="server"
          TransparentBackground="true"
          CancelButtonX="-200"
          CancelButtonY="-200">
            <Adapters>
                <cust:ImageUploadLoggingAdapter Runat="server" FolderName=".\photos"/>
            </Adapters>
        </fjx:FileUploader>

When I click 'open' for the file I just browsed to - there is no change in the behavior - it still brings me back to the control where I have to click the Upload button.

Is there something obvious I am missing?

Thanks....


Feb 25, 2009 at 4:27 AM
One more thing - my client has a workflow where he'd like to have a separate button somewhere on his page to do a form submit.

Is there some javascript that I can use following the same principle in this thread - but with one change.

Instead of programmatically starting the uploader when the File state changes - I'd like to actually do the following:

- use the fjx:FileUploader to select the file
- user clicks open on the selected file
- somewhere else on the form a submit button fires the event to start the uploader
- when the file is done, move to a new page with some new session variables (like a GUID for a file name that I can populate from within my custom adapter

I can see how to do this from .NET - well, acutally haven't looked at the fjx;FileUploader code but I suspect I can raise an event from that and capture it in the parent page and then programmatically click the upload button - but if it can be done via javascript - it would be easier for my client.
Coordinator
Feb 25, 2009 at 4:56 AM
Edited Feb 25, 2009 at 4:56 AM

<
script>
function GenerateFileRow(uploader, row, container){
    Flajaxian.generateFileRow(uploader, row, container);
    if(!uploader._waits)
      window.setTimeout(Flajaxian.bind(StartFileUpload, uploader), 500);
    uploader._waits = true;
}
function  StartFileUpload(){
    this._waits = false;
    this.startUpload();
}
</script>
<fjx:FileUploader JsFunc_GenerateFileRow="GenerateFileRow" runat="server" 
    CancelButtonX="-200"
    CancelButtonY="-200">

    <Adapters>
        <fjx:FileSaverAdapter Runat="server" FolderName="UploadFolder" />
    </Adapters>
</fjx:FileUploader>
Mar 2, 2009 at 11:06 AM
Hi,

This is uploading only one file for me. I wrote custom adapter to save the file into database.
Any help?

Regards,
Krunal
Coordinator
Mar 2, 2009 at 3:30 PM
There must be something wrong with your adapter. I just tested the code on several browsers.