logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Upload filename: msg#00100

Subject: Re: Upload filename
Quoting joern turner <joern.turner-S0/GAf8tV78@xxxxxxxxxxxxxxxx>:

> Eduardo Millán wrote:
> 
> > Talking about ServletAdapter and processMultiPartRequest:
> > 
> > Should the file sent with the upload control be saved into the *uploadDir*
> > directory set at Servlet initialization parameters? Or only establish the
> > encoded data into the instance? We can do anything suitable to our needs.
> i think it should depend on the datatype of the bound node.
> 
> 
> from 8.1.6 The upload Element:
> "Implementation Requirements: For anyURI data binding:
> 
>      *
> 
>        When bound to an instance data node of type xsd:anyURI (or a type 
> derived by restriction thereof), on activation upload places a URI in 
> the content of the node.
> 
>        For security reasons, the XForms Processor must not dereference 
> the URI bound to this form control without explicit user permission.
> 
>        Note:
> 
>        Implementors note that upload must associate the binary content, 
> mediatype, and filename with that URI for 11.4 Serialization as 
> multipart/related and 11.5 Serialization as multipart/form-data 
> serialization."
> 
> my proposal would be: when we've got a anyURI type for the bound node, 
> we'll put the (file) URI into that node *and* save the data to 
> uploaddir. for the other datatyes (base64,hexBinary) we store the data 
> directly as part of the intance data.

>From Servlet adapter you cannot find out which datatype the bounded control
owns. I see that getModelBinding() in BoundElement is protected and can't
figure out how to get it.

Other issue, what happens with Upload.setValue() when the user specifies
a Single Node Binding, e.g. using *ref* attributes instead *bind* ones?
I've modified Upload.java to throw a XFormsException in that case, cause
don't know if there is a way out.

Regards.



> 
> Joern
> 
> > 
> > Cheers.
> > 
> 


-- 
Eduardo Millán
Technical Telecommunications engineer, specialist in Telematics
Java programmer and analyst
ALBA Software: http://www.albasoft.com


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>