Hi, Can we allow the xforms:upload to allow only image files. <xforms:instance id="uploadinstance"> <uploads xmlns=""> <upload> <dataFile xsi:type="xsd:base64Binary"
filename="" mediatype=""
size=""></dataFile> </upload> </uploads> </xforms:instance> <xforms:upload
ref="instance('uploadinstance')/upload/dataFile"
class="upload"> <xforms:label>Upload File :</xforms:label> <xforms:filename ref="@filename"/> <xforms:mediatype ref="@mediatype"/> </xforms:upload> The above code I used. It accepts all files.But I have to accept only
image files. Thanks, Prameela -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi, We did something similar with a bind with a constraint on the @mediatype, something like this for you: <xforms:bind nodeset="upload/dataFile" constraint="@mediatype = 'image/gif'"/>
Note that this works only after a file has been uploaded and the @mediatype has been filled. We cannot prevent the picker from selecting files of the wrong type. Jeroen On Fri, Mar 13, 2009 at 1:31 PM, Prameela R <[hidden email]> wrote:
-- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Prameela R
Hi Peter,
Yep the new TEMSDatabase fixes the issue. Thanks Alan --------- Original Message -------- From: [hidden email] To: [hidden email] <[hidden email]> Subject: [ops-users] Re: XForm Upload Date: 16/03/09 09:52 > Hi,We did something similar with a bind with a constraint on the @mediatype, something like this for you: <xforms:bind nodeset="upload/dataFile" constraint="@mediatype = 'image/gif'"/> > Note that this works only after a file has been uploaded and the @mediatype has been filled. We cannot prevent the picker from selecting files of the wrong type.Jeroen > On Fri, Mar 13, 2009 at 1:31 PM, Prameela R <[hidden email]> wrote: > > > > > > > > > > > > > > Hi, > > > > Can we allow the xforms:upload to allow only image files. > > > > <xforms:instance id="uploadinstance"> > > <uploads xmlns=""> > > <upload> > > <dataFile xsi:type="xsd:base64Binary" > filename="" mediatype="" > size=""></dataFile> > > </upload> > > </uploads> > > </xforms:instance> > > > > <xforms:upload > ref="instance('uploadinstance')/upload/dataFile" > class="upload"> > > <xforms:label>Upload File :</xforms:label> > > <xforms:filename ref="@filename"/> > > <xforms:mediatype ref="@mediatype"/> > > </xforms:upload> > > > > The above code I used. It accepts all files.But I have to accept only > image files. > > > > Thanks, > > Prameela > > > > > > > > -- > You receive this message as a subscriber of the [hidden email] mailing > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > ________________________________________________ Message sent using UebiMiau 2.7.10 -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by Jeroen Hoffman
Jeroen,
Exactly, and this is a constraint of the browser. I don't think there is anything we can do directly on the browser to stop someone from selecting a file which is not of a type you want. Alex |
Free forum by Nabble | Edit this page |