xf:upload with multipart/form-data example?

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

xf:upload with multipart/form-data example?

Mark Waschkowski
Hi,

I'm looking for an xf:upload example using multipart/form-data, does
anyone have an example to share or know of some documentation on the
web?

Thanks,

Mark

_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Aaron Reed
Hi Mark,

One place that usually has an example of everything is the XForms
Testsuite.  For what you want, you could try:
http://www.w3.org/MarkUp/Forms/Test/XForms1.0/Edition2/Chapt11/11.5/11.5.a.xhtml

--Aaron

mwaschkowski wrote:

> Hi,
>
> I'm looking for an xf:upload example using multipart/form-data, does
> anyone have an example to share or know of some documentation on the
> web?
>
> Thanks,
>
> Mark
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Mark Waschkowski
In reply to this post by Mark Waschkowski
OK, lets try this again since there were no earlier responses.

It doesn't appear to me that the upload control is working properly
using the xforms code below. Any suggestions or, ideally, can anyone
post successful use of upload?

Thanks!

Mark

<code>
<?xml version="1.0" encoding="UTF-8"?>
<html
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:xf="http://www.w3.org/2002/xforms"
  xmlns:ev="http://www.w3.org/2001/xml-events"
  xmlns:chd="http://www.rds.com/chameleon/document"
  xmlns:chm="http://www.rds.com/chameleon/meta"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  >
   <head>
      <title>Repository Builder</title>
      <xf:model>
         <xf:instance id="uploadInstance" xmlns="">
          <Data>
            <File xsi:type="xs:anyURI"/>
          </Data>
         </xf:instance>

         <xf:submission id="upload" action="uploadTester/test"
method="multipart-post" enctype="multipart/form-data" replace="all"
ref="instance('uploadInstance')" />
      </xf:model>
   </head>

   <body>
      <xf:upload ref="instance('uploadInstance')/File">
          <xf:filename>file:///C:/*.xml</xf:filename>
          <xf:mediatype>text/xml</xf:mediatype>
      </xf:upload>
      <br/>
      <xf:output ref="instance('uploadInstance')/File">
         <xf:label>File: </xf:label>
      </xf:output>

    <br/>
          <xf:submit submission="upload">
                <xf:label>Submit</xf:label>
          </xf:submit>
   </body>
</html>
</cod>

On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
> Hi,
>
> I'm looking for an xf:upload example using multipart/form-data, does
> anyone have an example to share or know of some documentation on the
> web?
>
> Thanks,
>
> Mark


_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Tyler St. John
Mark,

Did you look at the Xforms Wikibook http://en.wikibooks.org/wiki/XForms/
I just tested the upload example, it works fine for me.


http://en.wikibooks.org/wiki/XForms/Upload

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xf="http://www.w3.org/2002/xforms"
    xmlns:ev="http://www.w3.org/2001/xml-events"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
   <head>
       <title/>
       <xf:model>
           <xf:instance xmlns="">
               <Data>
                   <File xsi:type="xs:anyURI"/>
               </Data>
           </xf:instance>
       </xf:model>
   </head>
   <body>
       <xf:upload ref="/Data/File">
           <xf:filename>file:///C:/tmp/*.xml</xf:filename>
           <xf:mediatype>text/xml</xf:mediatype>
       </xf:upload>
       <br/>
       <xf:output ref="/Data/File">
          <xf:label>File: </xf:label>
       </xf:output>
   </body>
</html>


-Tyler

On 6/20/07, mwaschkowski <[hidden email]> wrote:

>
> OK, lets try this again since there were no earlier responses.
>
> It doesn't appear to me that the upload control is working properly
> using the xforms code below. Any suggestions or, ideally, can anyone
> post successful use of upload?
>
> Thanks!
>
> Mark
>
> <code>
> <?xml version="1.0" encoding="UTF-8"?>
> <html
>         xmlns="http://www.w3.org/1999/xhtml"
>         xmlns:xf="http://www.w3.org/2002/xforms"
>   xmlns:ev="http://www.w3.org/2001/xml-events"
>   xmlns:chd="http://www.rds.com/chameleon/document"
>   xmlns:chm="http://www.rds.com/chameleon/meta"
>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>   >
>    <head>
>       <title>Repository Builder</title>
>       <xf:model>
>          <xf:instance id="uploadInstance" xmlns="">
>           <Data>
>             <File xsi:type="xs:anyURI"/>
>           </Data>
>          </xf:instance>
>
>          <xf:submission id="upload" action="uploadTester/test"
> method="multipart-post" enctype="multipart/form-data" replace="all"
> ref="instance('uploadInstance')" />
>       </xf:model>
>    </head>
>
>    <body>
>       <xf:upload ref="instance('uploadInstance')/File">
>           <xf:filename>file:///C:/*.xml</xf:filename>
>           <xf:mediatype>text/xml</xf:mediatype>
>       </xf:upload>
>       <br/>
>       <xf:output ref="instance('uploadInstance')/File">
>          <xf:label>File: </xf:label>
>       </xf:output>
>
>     <br/>
>           <xf:submit submission="upload">
>                 <xf:label>Submit</xf:label>
>           </xf:submit>
>    </body>
> </html>
> </cod>
>
> On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
> > Hi,
> >
> > I'm looking for an xf:upload example using multipart/form-data, does
> > anyone have an example to share or know of some documentation on the
> > web?
> >
> > Thanks,
> >
> > Mark
>
>
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>



--
Tyler St. John
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Mark Waschkowski
In reply to this post by Mark Waschkowski
Hi,

Yes, I tried that and it works for the display part only - try using
the example to actually submit and then you'll run into the same
problem that I did - the multipart request gets mangled somehow and
isn't able to upload a file.

Mark

On Jun 20, 1:03 pm, "Tyler St. John" <[hidden email]> wrote:

> Mark,
>
> Did you look at the Xforms Wikibookhttp://en.wikibooks.org/wiki/XForms/
> I just tested the upload example, it works fine for me.
>
> http://en.wikibooks.org/wiki/XForms/Upload
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>     xmlns:xf="http://www.w3.org/2002/xforms"
>     xmlns:ev="http://www.w3.org/2001/xml-events"
>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>    <head>
>        <title/>
>        <xf:model>
>            <xf:instance xmlns="">
>                <Data>
>                    <File xsi:type="xs:anyURI"/>
>                </Data>
>            </xf:instance>
>        </xf:model>
>    </head>
>    <body>
>        <xf:upload ref="/Data/File">
>            <xf:filename>file:///C:/tmp/*.xml</xf:filename>
>            <xf:mediatype>text/xml</xf:mediatype>
>        </xf:upload>
>        <br/>
>        <xf:output ref="/Data/File">
>           <xf:label>File: </xf:label>
>        </xf:output>
>    </body>
> </html>
>
> -Tyler
>
> On 6/20/07, mwaschkowski <[hidden email]> wrote:
>
>
>
>
>
> > OK, lets try this again since there were no earlier responses.
>
> > It doesn't appear to me that the upload control is working properly
> > using the xforms code below. Any suggestions or, ideally, can anyone
> > post successful use of upload?
>
> > Thanks!
>
> > Mark
>
> > <code>
> > <?xml version="1.0" encoding="UTF-8"?>
> > <html
> >         xmlns="http://www.w3.org/1999/xhtml"
> >         xmlns:xf="http://www.w3.org/2002/xforms"
> >   xmlns:ev="http://www.w3.org/2001/xml-events"
> >   xmlns:chd="http://www.rds.com/chameleon/document"
> >   xmlns:chm="http://www.rds.com/chameleon/meta"
> >   xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> >    <head>
> >       <title>Repository Builder</title>
> >       <xf:model>
> >          <xf:instance id="uploadInstance" xmlns="">
> >           <Data>
> >             <File xsi:type="xs:anyURI"/>
> >           </Data>
> >          </xf:instance>
>
> >          <xf:submission id="upload" action="uploadTester/test"
> > method="multipart-post" enctype="multipart/form-data" replace="all"
> > ref="instance('uploadInstance')" />
> >       </xf:model>
> >    </head>
>
> >    <body>
> >       <xf:upload ref="instance('uploadInstance')/File">
> >           <xf:filename>file:///C:/*.xml</xf:filename>
> >           <xf:mediatype>text/xml</xf:mediatype>
> >       </xf:upload>
> >       <br/>
> >       <xf:output ref="instance('uploadInstance')/File">
> >          <xf:label>File: </xf:label>
> >       </xf:output>
>
> >     <br/>
> >           <xf:submit submission="upload">
> >                 <xf:label>Submit</xf:label>
> >           </xf:submit>
> >    </body>
> > </html>
> > </cod>
>
> > On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
> > > Hi,
>
> > > I'm looking for an xf:upload example using multipart/form-data, does
> > > anyone have an example to share or know of some documentation on the
> > > web?
>
> > > Thanks,
>
> > > Mark
>
> > _______________________________________________
> > dev-tech-xforms mailing list
> > [hidden email]
> >https://lists.mozilla.org/listinfo/dev-tech-xforms
>
> --
> Tyler St. John


_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Aaron Reed
Hi Mark,

You are right.  This doesn't work in 0.8.0.1.  This is caused by a bug
on the 1.8 branch that doesn't occur on the trunk (dealing with
ImportNode).  I could have sworn I tested this on 0.8 before it went
out, but I must have not checked the submission result closely enough.

I've opened bug: https://bugzilla.mozilla.org/show_bug.cgi?id=385857 
against us to work around the core bug and I already have a fix ready.
Since this is a 1.8 bug, I'll try to remember to check the fix into the
1.8 branch sooner rather than later in case someone wants this fix and
doesn't mind running on a nightly.

--Aaron

--Aaron

mwaschkowski wrote:

> Hi,
>
> Yes, I tried that and it works for the display part only - try using
> the example to actually submit and then you'll run into the same
> problem that I did - the multipart request gets mangled somehow and
> isn't able to upload a file.
>
> Mark
>
> On Jun 20, 1:03 pm, "Tyler St. John" <[hidden email]> wrote:
>> Mark,
>>
>> Did you look at the Xforms Wikibookhttp://en.wikibooks.org/wiki/XForms/
>> I just tested the upload example, it works fine for me.
>>
>> http://en.wikibooks.org/wiki/XForms/Upload
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>>     xmlns:xf="http://www.w3.org/2002/xforms"
>>     xmlns:ev="http://www.w3.org/2001/xml-events"
>>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>    <head>
>>        <title/>
>>        <xf:model>
>>            <xf:instance xmlns="">
>>                <Data>
>>                    <File xsi:type="xs:anyURI"/>
>>                </Data>
>>            </xf:instance>
>>        </xf:model>
>>    </head>
>>    <body>
>>        <xf:upload ref="/Data/File">
>>            <xf:filename>file:///C:/tmp/*.xml</xf:filename>
>>            <xf:mediatype>text/xml</xf:mediatype>
>>        </xf:upload>
>>        <br/>
>>        <xf:output ref="/Data/File">
>>           <xf:label>File: </xf:label>
>>        </xf:output>
>>    </body>
>> </html>
>>
>> -Tyler
>>
>> On 6/20/07, mwaschkowski <[hidden email]> wrote:
>>
>>
>>
>>
>>
>>> OK, lets try this again since there were no earlier responses.
>>> It doesn't appear to me that the upload control is working properly
>>> using the xforms code below. Any suggestions or, ideally, can anyone
>>> post successful use of upload?
>>> Thanks!
>>> Mark
>>> <code>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <html
>>>         xmlns="http://www.w3.org/1999/xhtml"
>>>         xmlns:xf="http://www.w3.org/2002/xforms"
>>>   xmlns:ev="http://www.w3.org/2001/xml-events"
>>>   xmlns:chd="http://www.rds.com/chameleon/document"
>>>   xmlns:chm="http://www.rds.com/chameleon/meta"
>>>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>    <head>
>>>       <title>Repository Builder</title>
>>>       <xf:model>
>>>          <xf:instance id="uploadInstance" xmlns="">
>>>           <Data>
>>>             <File xsi:type="xs:anyURI"/>
>>>           </Data>
>>>          </xf:instance>
>>>          <xf:submission id="upload" action="uploadTester/test"
>>> method="multipart-post" enctype="multipart/form-data" replace="all"
>>> ref="instance('uploadInstance')" />
>>>       </xf:model>
>>>    </head>
>>>    <body>
>>>       <xf:upload ref="instance('uploadInstance')/File">
>>>           <xf:filename>file:///C:/*.xml</xf:filename>
>>>           <xf:mediatype>text/xml</xf:mediatype>
>>>       </xf:upload>
>>>       <br/>
>>>       <xf:output ref="instance('uploadInstance')/File">
>>>          <xf:label>File: </xf:label>
>>>       </xf:output>
>>>     <br/>
>>>           <xf:submit submission="upload">
>>>                 <xf:label>Submit</xf:label>
>>>           </xf:submit>
>>>    </body>
>>> </html>
>>> </cod>
>>> On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
>>>> Hi,
>>>> I'm looking for an xf:upload example using multipart/form-data, does
>>>> anyone have an example to share or know of some documentation on the
>>>> web?
>>>> Thanks,
>>>> Mark
>>> _______________________________________________
>>> dev-tech-xforms mailing list
>>> [hidden email]
>>> https://lists.mozilla.org/listinfo/dev-tech-xforms
>> --
>> Tyler St. John
>
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Mark Waschkowski
Hi Arron,

OK, great, thanks for the info. Assuming the next big release isn't
going to be for a while, then myself or a colleague would be happy to
test it.

Best,

Mark

On Jun 25, 9:49 pm, Aaron Reed <[hidden email]> wrote:

> Hi Mark,
>
> You are right.  This doesn't work in 0.8.0.1.  This is caused by a bug
> on the 1.8 branch that doesn't occur on the trunk (dealing with
> ImportNode).  I could have sworn I tested this on 0.8 before it went
> out, but I must have not checked the submission result closely enough.
>
> I've opened bug:https://bugzilla.mozilla.org/show_bug.cgi?id=385857
> against us to work around the core bug and I already have a fix ready.
> Since this is a 1.8 bug, I'll try to remember to check the fix into the
> 1.8 branch sooner rather than later in case someone wants this fix and
> doesn't mind running on a nightly.
>
> --Aaron
>
> --Aaron
>
> mwaschkowski wrote:
> > Hi,
>
> > Yes, I tried that and it works for the display part only - try using
> > the example to actually submit and then you'll run into the same
> > problem that I did - the multipart request gets mangled somehow and
> > isn't able to upload a file.
>
> > Mark
>
> > On Jun 20, 1:03 pm, "Tyler St. John" <[hidden email]> wrote:
> >> Mark,
>
> >> Did you look at the Xforms Wikibookhttp://en.wikibooks.org/wiki/XForms/
> >> I just tested the upload example, it works fine for me.
>
> >>http://en.wikibooks.org/wiki/XForms/Upload
>
> >> <html xmlns="http://www.w3.org/1999/xhtml"
> >>     xmlns:xf="http://www.w3.org/2002/xforms"
> >>     xmlns:ev="http://www.w3.org/2001/xml-events"
> >>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> >>    <head>
> >>        <title/>
> >>        <xf:model>
> >>            <xf:instance xmlns="">
> >>                <Data>
> >>                    <File xsi:type="xs:anyURI"/>
> >>                </Data>
> >>            </xf:instance>
> >>        </xf:model>
> >>    </head>
> >>    <body>
> >>        <xf:upload ref="/Data/File">
> >>            <xf:filename>file:///C:/tmp/*.xml</xf:filename>
> >>            <xf:mediatype>text/xml</xf:mediatype>
> >>        </xf:upload>
> >>        <br/>
> >>        <xf:output ref="/Data/File">
> >>           <xf:label>File: </xf:label>
> >>        </xf:output>
> >>    </body>
> >> </html>
>
> >> -Tyler
>
> >> On 6/20/07, mwaschkowski <[hidden email]> wrote:
>
> >>> OK, lets try this again since there were no earlier responses.
> >>> It doesn't appear to me that the upload control is working properly
> >>> using the xforms code below. Any suggestions or, ideally, can anyone
> >>> post successful use of upload?
> >>> Thanks!
> >>> Mark
> >>> <code>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>> <html
> >>>         xmlns="http://www.w3.org/1999/xhtml"
> >>>         xmlns:xf="http://www.w3.org/2002/xforms"
> >>>   xmlns:ev="http://www.w3.org/2001/xml-events"
> >>>   xmlns:chd="http://www.rds.com/chameleon/document"
> >>>   xmlns:chm="http://www.rds.com/chameleon/meta"
> >>>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>    <head>
> >>>       <title>Repository Builder</title>
> >>>       <xf:model>
> >>>          <xf:instance id="uploadInstance" xmlns="">
> >>>           <Data>
> >>>             <File xsi:type="xs:anyURI"/>
> >>>           </Data>
> >>>          </xf:instance>
> >>>          <xf:submission id="upload" action="uploadTester/test"
> >>> method="multipart-post" enctype="multipart/form-data" replace="all"
> >>> ref="instance('uploadInstance')" />
> >>>       </xf:model>
> >>>    </head>
> >>>    <body>
> >>>       <xf:upload ref="instance('uploadInstance')/File">
> >>>           <xf:filename>file:///C:/*.xml</xf:filename>
> >>>           <xf:mediatype>text/xml</xf:mediatype>
> >>>       </xf:upload>
> >>>       <br/>
> >>>       <xf:output ref="instance('uploadInstance')/File">
> >>>          <xf:label>File: </xf:label>
> >>>       </xf:output>
> >>>     <br/>
> >>>           <xf:submit submission="upload">
> >>>                 <xf:label>Submit</xf:label>
> >>>           </xf:submit>
> >>>    </body>
> >>> </html>
> >>> </cod>
> >>> On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
> >>>> Hi,
> >>>> I'm looking for an xf:upload example using multipart/form-data, does
> >>>> anyone have an example to share or know of some documentation on the
> >>>> web?
> >>>> Thanks,
> >>>> Mark
> >>> _______________________________________________
> >>> dev-tech-xforms mailing list
> >>> [hidden email]
> >>>https://lists.mozilla.org/listinfo/dev-tech-xforms
> >> --
> >> Tyler St. John


_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Mark Waschkowski
Oh, btw, please include an example here that I can use for testing,
and to show others how it should be done.

Thanks!

Mark

On Jun 27, 5:46 pm, mwaschkowski <[hidden email]> wrote:

> Hi Arron,
>
> OK, great, thanks for the info. Assuming the next big release isn't
> going to be for a while, then myself or a colleague would be happy to
> test it.
>
> Best,
>
> Mark
>
> On Jun 25, 9:49 pm, Aaron Reed <[hidden email]> wrote:
>
> > Hi Mark,
>
> > You are right.  This doesn't work in 0.8.0.1.  This is caused by a bug
> > on the 1.8 branch that doesn't occur on the trunk (dealing with
> > ImportNode).  I could have sworn I tested this on 0.8 before it went
> > out, but I must have not checked the submission result closely enough.
>
> > I've opened bug:https://bugzilla.mozilla.org/show_bug.cgi?id=385857
> > against us to work around the core bug and I already have a fix ready.
> > Since this is a 1.8 bug, I'll try to remember to check the fix into the
> > 1.8 branch sooner rather than later in case someone wants this fix and
> > doesn't mind running on a nightly.
>
> > --Aaron
>
> > --Aaron
>
> > mwaschkowski wrote:
> > > Hi,
>
> > > Yes, I tried that and it works for the display part only - try using
> > > the example to actually submit and then you'll run into the same
> > > problem that I did - the multipart request gets mangled somehow and
> > > isn't able to upload a file.
>
> > > Mark
>
> > > On Jun 20, 1:03 pm, "Tyler St. John" <[hidden email]> wrote:
> > >> Mark,
>
> > >> Did you look at the Xforms Wikibookhttp://en.wikibooks.org/wiki/XForms/
> > >> I just tested the upload example, it works fine for me.
>
> > >>http://en.wikibooks.org/wiki/XForms/Upload
>
> > >> <html xmlns="http://www.w3.org/1999/xhtml"
> > >>     xmlns:xf="http://www.w3.org/2002/xforms"
> > >>     xmlns:ev="http://www.w3.org/2001/xml-events"
> > >>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> > >>    <head>
> > >>        <title/>
> > >>        <xf:model>
> > >>            <xf:instance xmlns="">
> > >>                <Data>
> > >>                    <File xsi:type="xs:anyURI"/>
> > >>                </Data>
> > >>            </xf:instance>
> > >>        </xf:model>
> > >>    </head>
> > >>    <body>
> > >>        <xf:upload ref="/Data/File">
> > >>            <xf:filename>file:///C:/tmp/*.xml</xf:filename>
> > >>            <xf:mediatype>text/xml</xf:mediatype>
> > >>        </xf:upload>
> > >>        <br/>
> > >>        <xf:output ref="/Data/File">
> > >>           <xf:label>File: </xf:label>
> > >>        </xf:output>
> > >>    </body>
> > >> </html>
>
> > >> -Tyler
>
> > >> On 6/20/07, mwaschkowski <[hidden email]> wrote:
>
> > >>> OK, lets try this again since there were no earlier responses.
> > >>> It doesn't appear to me that the upload control is working properly
> > >>> using the xforms code below. Any suggestions or, ideally, can anyone
> > >>> post successful use of upload?
> > >>> Thanks!
> > >>> Mark
> > >>> <code>
> > >>> <?xml version="1.0" encoding="UTF-8"?>
> > >>> <html
> > >>>         xmlns="http://www.w3.org/1999/xhtml"
> > >>>         xmlns:xf="http://www.w3.org/2002/xforms"
> > >>>   xmlns:ev="http://www.w3.org/2001/xml-events"
> > >>>   xmlns:chd="http://www.rds.com/chameleon/document"
> > >>>   xmlns:chm="http://www.rds.com/chameleon/meta"
> > >>>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
> > >>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >>>    <head>
> > >>>       <title>Repository Builder</title>
> > >>>       <xf:model>
> > >>>          <xf:instance id="uploadInstance" xmlns="">
> > >>>           <Data>
> > >>>             <File xsi:type="xs:anyURI"/>
> > >>>           </Data>
> > >>>          </xf:instance>
> > >>>          <xf:submission id="upload" action="uploadTester/test"
> > >>> method="multipart-post" enctype="multipart/form-data" replace="all"
> > >>> ref="instance('uploadInstance')" />
> > >>>       </xf:model>
> > >>>    </head>
> > >>>    <body>
> > >>>       <xf:upload ref="instance('uploadInstance')/File">
> > >>>           <xf:filename>file:///C:/*.xml</xf:filename>
> > >>>           <xf:mediatype>text/xml</xf:mediatype>
> > >>>       </xf:upload>
> > >>>       <br/>
> > >>>       <xf:output ref="instance('uploadInstance')/File">
> > >>>          <xf:label>File: </xf:label>
> > >>>       </xf:output>
> > >>>     <br/>
> > >>>           <xf:submit submission="upload">
> > >>>                 <xf:label>Submit</xf:label>
> > >>>           </xf:submit>
> > >>>    </body>
> > >>> </html>
> > >>> </cod>
> > >>> On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
> > >>>> Hi,
> > >>>> I'm looking for an xf:upload example using multipart/form-data, does
> > >>>> anyone have an example to share or know of some documentation on the
> > >>>> web?
> > >>>> Thanks,
> > >>>> Mark
> > >>> _______________________________________________
> > >>> dev-tech-xforms mailing list
> > >>> [hidden email]
> > >>>https://lists.mozilla.org/listinfo/dev-tech-xforms
> > >> --
> > >> Tyler St. John


_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Aaron Reed
Hi Mark,

There is a simple testcase referenced in the bug.

--Aaron

mwaschkowski wrote:

> Oh, btw, please include an example here that I can use for testing,
> and to show others how it should be done.
>
> Thanks!
>
> Mark
>
> On Jun 27, 5:46 pm, mwaschkowski <[hidden email]> wrote:
>> Hi Arron,
>>
>> OK, great, thanks for the info. Assuming the next big release isn't
>> going to be for a while, then myself or a colleague would be happy to
>> test it.
>>
>> Best,
>>
>> Mark
>>
>> On Jun 25, 9:49 pm, Aaron Reed <[hidden email]> wrote:
>>
>>> Hi Mark,
>>> You are right.  This doesn't work in 0.8.0.1.  This is caused by a bug
>>> on the 1.8 branch that doesn't occur on the trunk (dealing with
>>> ImportNode).  I could have sworn I tested this on 0.8 before it went
>>> out, but I must have not checked the submission result closely enough.
>>> I've opened bug:https://bugzilla.mozilla.org/show_bug.cgi?id=385857
>>> against us to work around the core bug and I already have a fix ready.
>>> Since this is a 1.8 bug, I'll try to remember to check the fix into the
>>> 1.8 branch sooner rather than later in case someone wants this fix and
>>> doesn't mind running on a nightly.
>>> --Aaron
>>> --Aaron
>>> mwaschkowski wrote:
>>>> Hi,
>>>> Yes, I tried that and it works for the display part only - try using
>>>> the example to actually submit and then you'll run into the same
>>>> problem that I did - the multipart request gets mangled somehow and
>>>> isn't able to upload a file.
>>>> Mark
>>>> On Jun 20, 1:03 pm, "Tyler St. John" <[hidden email]> wrote:
>>>>> Mark,
>>>>> Did you look at the Xforms Wikibookhttp://en.wikibooks.org/wiki/XForms/
>>>>> I just tested the upload example, it works fine for me.
>>>>> http://en.wikibooks.org/wiki/XForms/Upload
>>>>> <html xmlns="http://www.w3.org/1999/xhtml"
>>>>>     xmlns:xf="http://www.w3.org/2002/xforms"
>>>>>     xmlns:ev="http://www.w3.org/2001/xml-events"
>>>>>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>    <head>
>>>>>        <title/>
>>>>>        <xf:model>
>>>>>            <xf:instance xmlns="">
>>>>>                <Data>
>>>>>                    <File xsi:type="xs:anyURI"/>
>>>>>                </Data>
>>>>>            </xf:instance>
>>>>>        </xf:model>
>>>>>    </head>
>>>>>    <body>
>>>>>        <xf:upload ref="/Data/File">
>>>>>            <xf:filename>file:///C:/tmp/*.xml</xf:filename>
>>>>>            <xf:mediatype>text/xml</xf:mediatype>
>>>>>        </xf:upload>
>>>>>        <br/>
>>>>>        <xf:output ref="/Data/File">
>>>>>           <xf:label>File: </xf:label>
>>>>>        </xf:output>
>>>>>    </body>
>>>>> </html>
>>>>> -Tyler
>>>>> On 6/20/07, mwaschkowski <[hidden email]> wrote:
>>>>>> OK, lets try this again since there were no earlier responses.
>>>>>> It doesn't appear to me that the upload control is working properly
>>>>>> using the xforms code below. Any suggestions or, ideally, can anyone
>>>>>> post successful use of upload?
>>>>>> Thanks!
>>>>>> Mark
>>>>>> <code>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <html
>>>>>>         xmlns="http://www.w3.org/1999/xhtml"
>>>>>>         xmlns:xf="http://www.w3.org/2002/xforms"
>>>>>>   xmlns:ev="http://www.w3.org/2001/xml-events"
>>>>>>   xmlns:chd="http://www.rds.com/chameleon/document"
>>>>>>   xmlns:chm="http://www.rds.com/chameleon/meta"
>>>>>>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>>>>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>>>    <head>
>>>>>>       <title>Repository Builder</title>
>>>>>>       <xf:model>
>>>>>>          <xf:instance id="uploadInstance" xmlns="">
>>>>>>           <Data>
>>>>>>             <File xsi:type="xs:anyURI"/>
>>>>>>           </Data>
>>>>>>          </xf:instance>
>>>>>>          <xf:submission id="upload" action="uploadTester/test"
>>>>>> method="multipart-post" enctype="multipart/form-data" replace="all"
>>>>>> ref="instance('uploadInstance')" />
>>>>>>       </xf:model>
>>>>>>    </head>
>>>>>>    <body>
>>>>>>       <xf:upload ref="instance('uploadInstance')/File">
>>>>>>           <xf:filename>file:///C:/*.xml</xf:filename>
>>>>>>           <xf:mediatype>text/xml</xf:mediatype>
>>>>>>       </xf:upload>
>>>>>>       <br/>
>>>>>>       <xf:output ref="instance('uploadInstance')/File">
>>>>>>          <xf:label>File: </xf:label>
>>>>>>       </xf:output>
>>>>>>     <br/>
>>>>>>           <xf:submit submission="upload">
>>>>>>                 <xf:label>Submit</xf:label>
>>>>>>           </xf:submit>
>>>>>>    </body>
>>>>>> </html>
>>>>>> </cod>
>>>>>> On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
>>>>>>> Hi,
>>>>>>> I'm looking for an xf:upload example using multipart/form-data, does
>>>>>>> anyone have an example to share or know of some documentation on the
>>>>>>> web?
>>>>>>> Thanks,
>>>>>>> Mark
>>>>>> _______________________________________________
>>>>>> dev-tech-xforms mailing list
>>>>>> [hidden email]
>>>>>> https://lists.mozilla.org/listinfo/dev-tech-xforms
>>>>> --
>>>>> Tyler St. John
>
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|

Re: xf:upload with multipart/form-data example?

Mark Waschkowski
OK, thanks.

Mark

On Jun 28, 1:07 pm, Aaron Reed <[hidden email]> wrote:

> Hi Mark,
>
> There is a simple testcase referenced in the bug.
>
> --Aaron
>
> mwaschkowski wrote:
> > Oh, btw, please include an example here that I can use for testing,
> > and to show others how it should be done.
>
> > Thanks!
>
> > Mark
>
> > On Jun 27, 5:46 pm, mwaschkowski <[hidden email]> wrote:
> >> Hi Arron,
>
> >> OK, great, thanks for the info. Assuming the next big release isn't
> >> going to be for a while, then myself or a colleague would be happy to
> >> test it.
>
> >> Best,
>
> >> Mark
>
> >> On Jun 25, 9:49 pm, Aaron Reed <[hidden email]> wrote:
>
> >>> Hi Mark,
> >>> You are right.  This doesn't work in 0.8.0.1.  This is caused by a bug
> >>> on the 1.8 branch that doesn't occur on the trunk (dealing with
> >>> ImportNode).  I could have sworn I tested this on 0.8 before it went
> >>> out, but I must have not checked the submission result closely enough.
> >>> I've opened bug:https://bugzilla.mozilla.org/show_bug.cgi?id=385857
> >>> against us to work around the core bug and I already have a fix ready.
> >>> Since this is a 1.8 bug, I'll try to remember to check the fix into the
> >>> 1.8 branch sooner rather than later in case someone wants this fix and
> >>> doesn't mind running on a nightly.
> >>> --Aaron
> >>> --Aaron
> >>> mwaschkowski wrote:
> >>>> Hi,
> >>>> Yes, I tried that and it works for the display part only - try using
> >>>> the example to actually submit and then you'll run into the same
> >>>> problem that I did - the multipart request gets mangled somehow and
> >>>> isn't able to upload a file.
> >>>> Mark
> >>>> On Jun 20, 1:03 pm, "Tyler St. John" <[hidden email]> wrote:
> >>>>> Mark,
> >>>>> Did you look at the Xforms Wikibookhttp://en.wikibooks.org/wiki/XForms/
> >>>>> I just tested the upload example, it works fine for me.
> >>>>>http://en.wikibooks.org/wiki/XForms/Upload
> >>>>> <html xmlns="http://www.w3.org/1999/xhtml"
> >>>>>     xmlns:xf="http://www.w3.org/2002/xforms"
> >>>>>     xmlns:ev="http://www.w3.org/2001/xml-events"
> >>>>>     xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >>>>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>>>    <head>
> >>>>>        <title/>
> >>>>>        <xf:model>
> >>>>>            <xf:instance xmlns="">
> >>>>>                <Data>
> >>>>>                    <File xsi:type="xs:anyURI"/>
> >>>>>                </Data>
> >>>>>            </xf:instance>
> >>>>>        </xf:model>
> >>>>>    </head>
> >>>>>    <body>
> >>>>>        <xf:upload ref="/Data/File">
> >>>>>            <xf:filename>file:///C:/tmp/*.xml</xf:filename>
> >>>>>            <xf:mediatype>text/xml</xf:mediatype>
> >>>>>        </xf:upload>
> >>>>>        <br/>
> >>>>>        <xf:output ref="/Data/File">
> >>>>>           <xf:label>File: </xf:label>
> >>>>>        </xf:output>
> >>>>>    </body>
> >>>>> </html>
> >>>>> -Tyler
> >>>>> On 6/20/07, mwaschkowski <[hidden email]> wrote:
> >>>>>> OK, lets try this again since there were no earlier responses.
> >>>>>> It doesn't appear to me that the upload control is working properly
> >>>>>> using the xforms code below. Any suggestions or, ideally, can anyone
> >>>>>> post successful use of upload?
> >>>>>> Thanks!
> >>>>>> Mark
> >>>>>> <code>
> >>>>>> <?xml version="1.0" encoding="UTF-8"?>
> >>>>>> <html
> >>>>>>         xmlns="http://www.w3.org/1999/xhtml"
> >>>>>>         xmlns:xf="http://www.w3.org/2002/xforms"
> >>>>>>   xmlns:ev="http://www.w3.org/2001/xml-events"
> >>>>>>   xmlns:chd="http://www.rds.com/chameleon/document"
> >>>>>>   xmlns:chm="http://www.rds.com/chameleon/meta"
> >>>>>>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
> >>>>>>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>>>>    <head>
> >>>>>>       <title>Repository Builder</title>
> >>>>>>       <xf:model>
> >>>>>>          <xf:instance id="uploadInstance" xmlns="">
> >>>>>>           <Data>
> >>>>>>             <File xsi:type="xs:anyURI"/>
> >>>>>>           </Data>
> >>>>>>          </xf:instance>
> >>>>>>          <xf:submission id="upload" action="uploadTester/test"
> >>>>>> method="multipart-post" enctype="multipart/form-data" replace="all"
> >>>>>> ref="instance('uploadInstance')" />
> >>>>>>       </xf:model>
> >>>>>>    </head>
> >>>>>>    <body>
> >>>>>>       <xf:upload ref="instance('uploadInstance')/File">
> >>>>>>           <xf:filename>file:///C:/*.xml</xf:filename>
> >>>>>>           <xf:mediatype>text/xml</xf:mediatype>
> >>>>>>       </xf:upload>
> >>>>>>       <br/>
> >>>>>>       <xf:output ref="instance('uploadInstance')/File">
> >>>>>>          <xf:label>File: </xf:label>
> >>>>>>       </xf:output>
> >>>>>>     <br/>
> >>>>>>           <xf:submit submission="upload">
> >>>>>>                 <xf:label>Submit</xf:label>
> >>>>>>           </xf:submit>
> >>>>>>    </body>
> >>>>>> </html>
> >>>>>> </cod>
> >>>>>> On May 10, 8:46 am, mwaschkowski <[hidden email]> wrote:
> >>>>>>> Hi,
> >>>>>>> I'm looking for an xf:upload example using multipart/form-data, does
> >>>>>>> anyone have an example to share or know of some documentation on the
> >>>>>>> web?
> >>>>>>> Thanks,
> >>>>>>> Mark
> >>>>>> _______________________________________________
> >>>>>> dev-tech-xforms mailing list
> >>>>>> [hidden email]
> >>>>>>https://lists.mozilla.org/listinfo/dev-tech-xforms
> >>>>> --
> >>>>> Tyler St. John


_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms