local file path of file uploaded

I know this topic has been discussed before. Due to security , flash does not return the local file path for the FileReference object.
I did some googling and found someone who posted in the adobe forum
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp...
that it is possible to get the local path by calling using javascript functions (but maybe only works only on IE)
Extracted from the adobe forum
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp...
===============================================
Use the
import flash.external.*; class -- please search for that, there are lotsof tutorials

and call a javascript function

In the javascript make a new active x object
new ActiveXObject("Scripting.FileSystemObject")

and use the property below to get the pathname.
GetParentFolderName(window.location.pathname)

You can return this back to flash.

===============================================

Is it possible to modify swfupload to do this?

gyphie's picture

Doesn't make sense

That code doesn't make sense. Here's why (and I did read the original post on Adobe's forums:

window.location.pathname has nothing to do with a file pulled of your local computer. All it does is return the path of the webpage that you are currently visiting. That is, the _servers_ path which is probably virtual anyways and more than likely doesn't exist on your local system and would be quite a coincidence if you happened to select a local file from a local path that happens to match the server path.

Asking the Scripting.FileSystemObject to get a server's ParentFolderName is probably not going to work.

Furthermore, this is only going to work in IE on Windows. It will probably be blocked by security settings and (assuming everything else works) you don't need to involve Flash or modify SWFUpload. You can implement this yourself in one of your event handlers. The only information Flash gives is the file's name. If you manage to get the path using FileSystemObject there is no reason to pass it back to Flash. The only option you have is to send the information along as a File Param (see the AddFileParam method in the docs).