Automatically Initialize Filename

Sep 3, 2008 at 10:09 PM
Is there a way to programmatically add a filename to the upload queue without the user 'browsing' to the file?  I would like to use a URL parm like "" to initialize the upload control
Sep 3, 2008 at 10:59 PM
How would you know if the client has this file and where it is located on the client machine?
Sep 4, 2008 at 2:31 AM
I'm invoking the browser from a different application.  Instead of uploading the file directly from the other application, I want to present the user with options (metadata) about the file before its uploaded. I already know the filename/location since the other application already created the file programmatically.  I want the website to either:
A) support ad-hoc browsing / uploading


B) support the case where it's invoked by my other application (filename / location is already known)

Does this make sense?

Sep 4, 2008 at 5:06 AM
Edited Sep 4, 2008 at 5:07 AM

The security constraints of the flash file upload allow access only to files explicitly chosen by the user. But even if that wasn’t the case what you propose doesn’t look as a good architecture to me. If another application already has access to the file, then why do you need this component at all? Just send it from there.

You can create a wrapper around this component and your application on the client machine but that will require a bit of work and I can’t give you a simple example of how to do that. In this case you would only include the file in the list but you’d have to upload it with your application. Just play with JavaScript functions of the adapter for generating the file list.

Feb 3, 2009 at 4:05 AM
Flajaxian, rgrohsman -

My client loves what the component can do, but I have a situation similar to the initial question posted by rgrohsman.

My client would like to use their own control for picking the file, and then pass that file name to the flajaxian component and hide everything but the progress bar and its animation.  Then they'd like to take advantage of the post-upload javascript examples to direct to some other action or page.

So, is it possible to pass a file from a control in some other div to the flajaxian component - or is there some javascript trickery I can perform to simulate this and then pass my filename in over viewstate or something into my custom adapter?  Or is this a security violation like you've mentioned?

Thanks in advance...

Feb 3, 2009 at 6:29 AM
Edited Feb 3, 2009 at 6:32 AM
It was possible in the previous version of flash player but Adobe had many security complains. For example imagine this scenario: One totaly legitimate site that users trust is participating in a banner sharing network. One of these banners creates a nasty flash movie that prompts the user to choose a file from his computer. And the message is totaly legitimate one because the site is well known and respected, only the banner is nasty and the site owner is not aware of that. If the users chooses to cancel the dialog, a new dialog pops up again so he cannot close his window unless he chooses a file. Well of course the user can close it from the task manger but most users don't know about the task manager. So in Flash Player 10 you have to implicitly choose the file with your mouse action and not with a script in order for the dialog to pop up.

So just explain to your client that the fact that this is not possible is a good thing because it meand his clents have more reasons to trust him.