Upload contro attributes

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Upload contro attributes

Taras Bahnyuk

In my form I have an upload control like

<xforms:upload ref="files/file[1]">  
    <xforms:filename ref="@filename"/>
   
<xforms:mediatype ref="@mediatype"/>
   
<xxforms:size ref="@size"/>
</xforms:upload>

In @filename attribute i expect something like "Sunset.jpg" but instead it returns
"c:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg "

What am i doing wrong?

Thanks,
-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Upload contro attributes

Erik Bruchez
Administrator
Taras,

I don't think you are doing anything wrong. The XForms engine sets the
file name as provided by the browser. Firefox and IE happen to behave
differently.

What do you want to do with that file name?

-Erik

Taras Bahnyuk wrote:

> In my form I have an upload control like
>
> <xforms:upload ref="files/file[1]">  
>     <xforms:filename ref="@filename"/>
>     <xforms:mediatype ref="@mediatype"/>
>     <xxforms:size ref="@size"/>
> </xforms:upload>
>
> In @filename attribute i expect something like "Sunset.jpg" but instead
> it returns
> "c:\Documents and Settings\All Users\Documents\My Pictures\Sample
> Pictures\Sunset.jpg "
>
> What am i doing wrong?
>
> Thanks,
> -Taras
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Upload contro attributes

Taras Bahnyuk
In reply to this post by Taras Bahnyuk
I need it to store the temporary file to the db.
As in example:
  <file filename="photo.jpg" mediatype="image/jpeg" size="2345"
xsi:type="xs:anyURI">file:/C:/Tomcat/temp/upload_00000005.tmp</file>

On eXist site I have a query that picks up the "upload_00000005.tmp" and
inserts it in the attachments collection, but I want to keep
"Sunset.jpg" filename.

-Taras



-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: vrijdag 16 juni 2006 17:35
To: [hidden email]
Subject: Re: [ops-users] Upload contro attributes

Taras,

I don't think you are doing anything wrong. The XForms engine sets the
file name as provided by the browser. Firefox and IE happen to behave
differently.

What do you want to do with that file name?

-Erik

Taras Bahnyuk wrote:
> In my form I have an upload control like
>
> <xforms:upload ref="files/file[1]">  
>     <xforms:filename ref="@filename"/>
>     <xforms:mediatype ref="@mediatype"/>
>     <xxforms:size ref="@size"/>
> </xforms:upload>
>
> In @filename attribute i expect something like "Sunset.jpg" but
instead
> it returns
> "c:\Documents and Settings\All Users\Documents\My Pictures\Sample
> Pictures\Sunset.jpg "
>
> What am i doing wrong?
>
> Thanks,
> -Taras

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Upload contro attributes

Taras Bahnyuk
In reply to this post by Taras Bahnyuk
Erik,

You're right, I just tested both browsers and indeed Firefox returns
just the filename and IE retun full path.
Now I know what to do :-)

Thanks :-)
-Taras
 

-----Original Message-----
From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez
Sent: vrijdag 16 juni 2006 17:35
To: [hidden email]
Subject: Re: [ops-users] Upload contro attributes

Taras,

I don't think you are doing anything wrong. The XForms engine sets the
file name as provided by the browser. Firefox and IE happen to behave
differently.

What do you want to do with that file name?

-Erik

Taras Bahnyuk wrote:
> In my form I have an upload control like
>
> <xforms:upload ref="files/file[1]">  
>     <xforms:filename ref="@filename"/>
>     <xforms:mediatype ref="@mediatype"/>
>     <xxforms:size ref="@size"/>
> </xforms:upload>
>
> In @filename attribute i expect something like "Sunset.jpg" but
instead
> it returns
> "c:\Documents and Settings\All Users\Documents\My Pictures\Sample
> Pictures\Sunset.jpg "
>
> What am i doing wrong?
>
> Thanks,
> -Taras

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Upload contro attributes

Erik Bruchez
Administrator
In reply to this post by Taras Bahnyuk
Taras Bahnyuk wrote:
> I need it to store the temporary file to the db.
> As in example:
>   <file filename="photo.jpg" mediatype="image/jpeg" size="2345"
> xsi:type="xs:anyURI">file:/C:/Tomcat/temp/upload_00000005.tmp</file>
>
> On eXist site I have a query that picks up the "upload_00000005.tmp" and
> inserts it in the attachments collection, but I want to keep
> "Sunset.jpg" filename.

Sounds reasonable. You can filter the path that's before the file name
before storing it.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws