You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ken in Nashua <kc...@live.com> on 2011/09/27 06:10:27 UTC

how to get orioginal filename for UploadedFile

Folks,

I am using this tap5 UploadedFile


                trailsBlob.setContentType(file.getContentType());
                trailsBlob.setFileName(file.getFileName());
                trailsBlob.setFilePath(file.getFilePath());
                trailsBlob.setNumBytes(new Long(file.getSize()));
                trailsBlob.setBytes(data);

And I want to track what the original filename of the file was that got uploaded.

This is naturally forensic evidence.

                trailsBlob.setFileName(file.getFileName());
                trailsBlob.setFilePath(file.getFilePath());

The above two calls are returning the same thing... just the filename. I need filepath.

No path is found anywhere.

Does anyone know why? Does anyone know how I can obtain the original filepath ?

Best Regards and thanks
kcolassi@live.com
 

 		 	   		  

Re: how to get orioginal filename for UploadedFile

Posted by Josh Canfield <jo...@gmail.com>.
Contemporary browsers don't send the path, just the filename.

http://www.google.com/search?q=html+file+input+path

On Mon, Sep 26, 2011 at 9:10 PM, Ken in Nashua <kc...@live.com> wrote:
>
> Folks,
>
> I am using this tap5 UploadedFile
>
>
>                trailsBlob.setContentType(file.getContentType());
>                trailsBlob.setFileName(file.getFileName());
>                trailsBlob.setFilePath(file.getFilePath());
>                trailsBlob.setNumBytes(new Long(file.getSize()));
>                trailsBlob.setBytes(data);
>
> And I want to track what the original filename of the file was that got uploaded.
>
> This is naturally forensic evidence.
>
>                trailsBlob.setFileName(file.getFileName());
>                trailsBlob.setFilePath(file.getFilePath());
>
> The above two calls are returning the same thing... just the filename. I need filepath.
>
> No path is found anywhere.
>
> Does anyone know why? Does anyone know how I can obtain the original filepath ?
>
> Best Regards and thanks
> kcolassi@live.com
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org