Upload Images in Seperate Deployment

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

Upload Images in Seperate Deployment

Phani S
Hi,
    I am running my Xforms Application in seperate deployment to orbeon. I want to upload an image.
My instance looks like

<xforms:instance id="image-instance">
    <image  xmlns="">
                <file xsi:type="xs:anyURI" filename="" mediatype="" size=""/>
    </image>
</xforms:instance>

I am trying to post to the example application in orbeon.

            <xforms:submission id="image-submission" method="post" replace="none" resource="http://localhost/orbeon-development/xforms-upload/test:"/>

My upload control

        <table class="upload-table">
            <xforms:repeat nodeset="instance('image-instance')/file" id="file-repeat">
                <tr>
                    <td>
                        <!-- Upload field -->
                        <xforms:upload ref="." xxforms:size="60">
                            <xforms:filename ref="@filename"/>
                            <xforms:mediatype ref="@mediatype"/>
                            <xxforms:size ref="@size"/>
                        </xforms:upload>
                    </td>
                </tr>
            </xforms:repeat>
        </table>
It is not working. Event I don't think it will work. I also copied the text.xpl to my application's xforms-jsp folder. Still not found any clue. How can I upload the image to  server. Once the image uploaded to a location on server the instance also has to be submitted to further process.
Please some one help me. If any one had working example please give me.
--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Upload Images in Seperate Deployment

Phani S
Please can some body respond how to upload from a separate deployment...

On Sun, Nov 8, 2009 at 12:39 PM, Phani Sajja <[hidden email]> wrote:
Hi,
    I am running my Xforms Application in seperate deployment to orbeon. I want to upload an image.
My instance looks like

<xforms:instance id="image-instance">
    <image  xmlns="">
                <file xsi:type="xs:anyURI" filename="" mediatype="" size=""/>
    </image>
</xforms:instance>

I am trying to post to the example application in orbeon.

            <xforms:submission id="image-submission" method="post" replace="none" resource="http://localhost/orbeon-development/xforms-upload/test:"/>

My upload control

        <table class="upload-table">
            <xforms:repeat nodeset="instance('image-instance')/file" id="file-repeat">
                <tr>
                    <td>
                        <!-- Upload field -->
                        <xforms:upload ref="." xxforms:size="60">
                            <xforms:filename ref="@filename"/>
                            <xforms:mediatype ref="@mediatype"/>
                            <xxforms:size ref="@size"/>
                        </xforms:upload>
                    </td>
                </tr>
            </xforms:repeat>
        </table>
It is not working. Event I don't think it will work. I also copied the text.xpl to my application's xforms-jsp folder. Still not found any clue. How can I upload the image to  server. Once the image uploaded to a location on server the instance also has to be submitted to further process.
Please some one help me. If any one had working example please give me.
--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398



--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Upload Images in Seperate Deployment

Philip.Cantin
Phani,

Just curious: what is triggering the submission here? And could you post your example code to this thread?


---Philip

Phani S wrote
Please can some body respond how to upload from a separate deployment...

On Sun, Nov 8, 2009 at 12:39 PM, Phani Sajja <sajja.phani@gmail.com> wrote:

> Hi,
>     I am running my Xforms Application in seperate deployment to orbeon. I
> want to upload an image.
> My instance looks like
>
> <xforms:instance id="image-instance">
>     <image  xmlns="">
>                 <file xsi:type="xs:anyURI" filename="" mediatype=""
> size=""/>
>     </image>
> </xforms:instance>
>
> I am trying to post to the example application in orbeon.
>
>             <xforms:submission id="image-submission" method="post"
> replace="none" resource="
> http://localhost/orbeon-development/xforms-upload/test:"/>
>
> My upload control
>
>         >             <xforms:repeat nodeset="instance('image-instance')/file"
> id="file-repeat">
>                 >                     >                 >             </xforms:repeat>
>        
>                        
>                         <xforms:upload ref="." xxforms:size="60">
>                             <xforms:filename ref="@filename"/>
>                             <xforms:mediatype ref="@mediatype"/>
>                             <xxforms:size ref="@size"/>
>                         </xforms:upload>
>                    
> It is not working. Event I don't think it will work. I also copied the
> text.xpl to my application's xforms-jsp folder. Still not found any clue.
> How can I upload the image to  server. Once the image uploaded to a location
> on server the instance also has to be submitted to further process.
> Please some one help me. If any one had working example please give me.
> --
> Phani. S
> M.Tech(Software Engineering)
> Motilal Nehru National Institute of Technology
> (+91) 9010093398
>



--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Upload Images in Seperate Deployment

Phani S
Hello Philip,
             After a lot of experiments now my application working from a separate deployment. But I am getting strange results(??). First, What ever resource I use in resource attribute of xforms:submission the file is storing in temp directory(I dont understand why?). Second, in my page I have two fields. One is date, it is required field and second is upload control. Only when I select a date it is allowing me to upload(did I do wrong in binding?). Third I want restrict the files to images only. I specified it in mediatype of xforms:upload control. But not working. Can you verify the code and tell what are the things wrong in it.

On Mon, Nov 9, 2009 at 9:06 PM, Philip.Cantin <[hidden email]> wrote:

Phani,

Just curious: what is triggering the submission here? And could you post
your example code to this thread?


---Philip


Phani S wrote:
>
> Please can some body respond how to upload from a separate deployment...
>
> On Sun, Nov 8, 2009 at 12:39 PM, Phani Sajja <[hidden email]>
> wrote:
>
>> Hi,
>>     I am running my Xforms Application in seperate deployment to orbeon.
>> I
>> want to upload an image.
>> My instance looks like
>>
>> <xforms:instance id="image-instance">
>>     <image  xmlns="">
>>                 <file xsi:type="xs:anyURI" filename="" mediatype=""
>> size=""/>
>>     </image>
>> </xforms:instance>
>>
>> I am trying to post to the example application in orbeon.
>>
>>             <xforms:submission id="image-submission" method="post"
>> replace="none" resource="
>> http://localhost/orbeon-development/xforms-upload/test:"/>
>>
>> My upload control
>>
>>         <table class="upload-table">
>>             <xforms:repeat nodeset="instance('image-instance')/file"
>> id="file-repeat">
>>                 <tr>
>>                     <td>
>>                         <!-- Upload field -->
>>                         <xforms:upload ref="." xxforms:size="60">
>>                             <xforms:filename ref="@filename"/>
>>                             <xforms:mediatype ref="@mediatype"/>
>>                             <xxforms:size ref="@size"/>
>>                         </xforms:upload>
>>                     </td>
>>                 </tr>
>>             </xforms:repeat>
>>         </table>
>> It is not working. Event I don't think it will work. I also copied the
>> text.xpl to my application's xforms-jsp folder. Still not found any clue.
>> How can I upload the image to  server. Once the image uploaded to a
>> location
>> on server the instance also has to be submitted to further process.
>> Please some one help me. If any one had working example please give me.
>> --
>> Phani. S
>> M.Tech(Software Engineering)
>> Motilal Nehru National Institute of Technology
>> (+91) 9010093398
>>
>
>
>
> --
> Phani. S
> M.Tech(Software Engineering)
> Motilal Nehru National Institute of Technology
> (+91) 9010093398
>
>
> --
> 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
>
>

--
View this message in context: http://n4.nabble.com/Upload-Images-in-Seperate-Deployment-tp584617p584975.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.


--
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




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Upload Images in Seperate Deployment

Philip.Cantin
Phani,

I'm afraid I am powerless without testing a sample of your code myself. Could you at least attach a small, working sample of your code to this thread (including your XPL)? That would enable us to help you more efficiently.


---Philip

Phani S wrote
Hello Philip,
             After a lot of experiments now my application working from a
separate deployment. But I am getting strange results(??). First, What ever
resource I use in resource attribute of xforms:submission the file is
storing in temp directory(I dont understand why?). Second, in my page I have
two fields. One is date, it is required field and second is upload control.
Only when I select a date it is allowing me to upload(did I do wrong in
binding?). Third I want restrict the files to images only. I specified it in
mediatype of xforms:upload control. But not working. Can you verify the code
and tell what are the things wrong in it.

On Mon, Nov 9, 2009 at 9:06 PM, Philip.Cantin <pjcantin@gmail.com> wrote:

>
> Phani,
>
> Just curious: what is triggering the submission here? And could you post
> your example code to this thread?
>
>
> ---Philip
>
>
> Phani S wrote:
> >
> > Please can some body respond how to upload from a separate deployment...
> >
> > On Sun, Nov 8, 2009 at 12:39 PM, Phani Sajja <sajja.phani@gmail.com>
> > wrote:
> >
> >> Hi,
> >>     I am running my Xforms Application in seperate deployment to orbeon.
> >> I
> >> want to upload an image.
> >> My instance looks like
> >>
> >> <xforms:instance id="image-instance">
> >>     <image  xmlns="">
> >>                 <file xsi:type="xs:anyURI" filename="" mediatype=""
> >> size=""/>
> >>     </image>
> >> </xforms:instance>
> >>
> >> I am trying to post to the example application in orbeon.
> >>
> >>             <xforms:submission id="image-submission" method="post"
> >> replace="none" resource="
> >> http://localhost/orbeon-development/xforms-upload/test:"/>
> >>
> >> My upload control
> >>
> >>         > >>             <xforms:repeat nodeset="instance('image-instance')/file"
> >> id="file-repeat">
> >>                 > >>                     > >>                 > >>             </xforms:repeat>
> >>        
> >>                        
> >>                         <xforms:upload ref="." xxforms:size="60">
> >>                             <xforms:filename ref="@filename"/>
> >>                             <xforms:mediatype ref="@mediatype"/>
> >>                             <xxforms:size ref="@size"/>
> >>                         </xforms:upload>
> >>                    
> >> It is not working. Event I don't think it will work. I also copied the
> >> text.xpl to my application's xforms-jsp folder. Still not found any
> clue.
> >> How can I upload the image to  server. Once the image uploaded to a
> >> location
> >> on server the instance also has to be submitted to further process.
> >> Please some one help me. If any one had working example please give me.
> >> --
> >> Phani. S
> >> M.Tech(Software Engineering)
> >> Motilal Nehru National Institute of Technology
> >> (+91) 9010093398
> >>
> >
> >
> >
> > --
> > Phani. S
> > M.Tech(Software Engineering)
> > Motilal Nehru National Institute of Technology
> > (+91) 9010093398
> >
> >
> > --
> > You receive this message as a subscriber of the ops-users@ow2.orgmailing
> > list.
> > To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> > For general help: mailto:sympa@ow2.org?subject=help
> > OW2 mailing lists service home page: http://www.ow2.org/wws
> >
> >
>
> --
> View this message in context:
> http://n4.nabble.com/Upload-Images-in-Seperate-Deployment-tp584617p584975.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org mailing
> list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Upload Images in Seperate Deployment

Phani S
Sorry Philip,
                 I forget to add the file. Here is my xhtml+xforms document.

On Tue, Nov 10, 2009 at 12:25 AM, Philip.Cantin <[hidden email]> wrote:

Phani,

I'm afraid I am powerless without testing a sample of your code myself.
Could you at least attach a small, working sample of your code to this
thread (including your XPL)? That would enable us to help you more
efficiently.


---Philip


Phani S wrote:
>
> Hello Philip,
>              After a lot of experiments now my application working from a
> separate deployment. But I am getting strange results(??). First, What
> ever
> resource I use in resource attribute of xforms:submission the file is
> storing in temp directory(I dont understand why?). Second, in my page I
> have
> two fields. One is date, it is required field and second is upload
> control.
> Only when I select a date it is allowing me to upload(did I do wrong in
> binding?). Third I want restrict the files to images only. I specified it
> in
> mediatype of xforms:upload control. But not working. Can you verify the
> code
> and tell what are the things wrong in it.
>
> On Mon, Nov 9, 2009 at 9:06 PM, Philip.Cantin <[hidden email]> wrote:
>
>>
>> Phani,
>>
>> Just curious: what is triggering the submission here? And could you post
>> your example code to this thread?
>>
>>
>> ---Philip
>>
>>
>> Phani S wrote:
>> >
>> > Please can some body respond how to upload from a separate
>> deployment...
>> >
>> > On Sun, Nov 8, 2009 at 12:39 PM, Phani Sajja <[hidden email]>
>> > wrote:
>> >
>> >> Hi,
>> >>     I am running my Xforms Application in seperate deployment to
>> orbeon.
>> >> I
>> >> want to upload an image.
>> >> My instance looks like
>> >>
>> >> <xforms:instance id="image-instance">
>> >>     <image  xmlns="">
>> >>                 <file xsi:type="xs:anyURI" filename="" mediatype=""
>> >> size=""/>
>> >>     </image>
>> >> </xforms:instance>
>> >>
>> >> I am trying to post to the example application in orbeon.
>> >>
>> >>             <xforms:submission id="image-submission" method="post"
>> >> replace="none" resource="
>> >> http://localhost/orbeon-development/xforms-upload/test:"/>
>> >>
>> >> My upload control
>> >>
>> >>         <table class="upload-table">
>> >>             <xforms:repeat nodeset="instance('image-instance')/file"
>> >> id="file-repeat">
>> >>                 <tr>
>> >>                     <td>
>> >>                         <!-- Upload field -->
>> >>                         <xforms:upload ref="." xxforms:size="60">
>> >>                             <xforms:filename ref="@filename"/>
>> >>                             <xforms:mediatype ref="@mediatype"/>
>> >>                             <xxforms:size ref="@size"/>
>> >>                         </xforms:upload>
>> >>                     </td>
>> >>                 </tr>
>> >>             </xforms:repeat>
>> >>         </table>
>> >> It is not working. Event I don't think it will work. I also copied the
>> >> text.xpl to my application's xforms-jsp folder. Still not found any
>> clue.
>> >> How can I upload the image to  server. Once the image uploaded to a
>> >> location
>> >> on server the instance also has to be submitted to further process.
>> >> Please some one help me. If any one had working example please give
>> me.
>> >> --
>> >> Phani. S
>> >> M.Tech(Software Engineering)
>> >> Motilal Nehru National Institute of Technology
>> >> (+91) 9010093398
>> >>
>> >
>> >
>> >
>> > --
>> > Phani. S
>> > M.Tech(Software Engineering)
>> > Motilal Nehru National Institute of Technology
>> > (+91) 9010093398
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the
>> [hidden email]
>> > 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
>> >
>> >
>>
>> --
>> View this message in context:
>> http://n4.nabble.com/Upload-Images-in-Seperate-Deployment-tp584617p584975.html
>> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>>
>>
>> --
>> 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
>>
>>
>
>
> --
> Phani. S
> M.Tech(Software Engineering)
> Motilal Nehru National Institute of Technology
> (+91) 9010093398
>
>
> --
> 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
>
>

--
View this message in context: http://n4.nabble.com/Upload-Images-in-Seperate-Deployment-tp584617p585073.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.


--
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




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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

upload.xhtml (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: Upload Images in Seperate Deployment

Philip.Cantin
In reply to this post by Phani S
Phani,

Phani S wrote
First, What ever resource I use in resource attribute of xforms:submission the file is
storing in temp directory(I dont understand why?).
If my hunch is correct, the location of where your files are stored is dependent on the path specified by the file serializer's config/url element in your XPL. Is there a file serializer in your XPL? Would you mind posting this code as well?

Phani S wrote
Second, in my page I have
two fields. One is date, it is required field and second is upload control.
Only when I select a date it is allowing me to upload(did I do wrong in
binding?).
After looking at your XHTML file, I do see that:

<xforms:bind nodeset="/file" type="xs:anyURI"/>

should be

<xforms:bind nodeset="/image/file" type="xs:anyURI"/>

since <image> is the root element in your 'file-instance' instance.


However, the Upload trigger still performs an action (I changed the <xforms:send> statement to an <xforms:setvalue> statement) even when I leave the date field blank. I'd need to see your XPL to help you further with this.

Phani S wrote
 Third I want restrict the files to images only. I specified it in
mediatype of xforms:upload control. But not working.
This thread may help:

http://n4.nabble.com/XForm-Upload-td42763.html#a42763



---Philip
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Upload Images in Seperate Deployment

Phani S
Hi Philip,
          I don't have any xpl. I wrote a java class to read the temp file and produce the original image. Can you send me the file back to me which you modified. I am also unable to restrict the content to be only images. If possible please do it. Send me the file back.

Thanks

On Tue, Nov 10, 2009 at 9:18 PM, Philip.Cantin <[hidden email]> wrote:

Phani,


Phani S wrote:
>
> First, What ever resource I use in resource attribute of xforms:submission
> the file is
> storing in temp directory(I dont understand why?).

If my hunch is correct, the location of where your files are stored is
dependent on the path specified by the file serializer's config/url element
in your XPL. Is there a file serializer in your XPL? Would you mind posting
this code as well?


Phani S wrote:
>
> Second, in my page I have
> two fields. One is date, it is required field and second is upload
> control.
> Only when I select a date it is allowing me to upload(did I do wrong in
> binding?).

After looking at your XHTML file, I do see that:

<xforms:bind nodeset="/file" type="xs:anyURI"/>

should be

<xforms:bind nodeset="/image/file" type="xs:anyURI"/>

since <image> is the root element in your 'file-instance' instance.


However, the Upload trigger still performs an action (I changed the
<xforms:send> statement to an <xforms:setvalue> statement) even when I leave
the date field blank. I'd need to see your XPL to help you further with
this.


Phani S wrote:
>
>  Third I want restrict the files to images only. I specified it in
> mediatype of xforms:upload control. But not working.

This thread may help:

http://n4.nabble.com/XForm-Upload-td42763.html#a42763



---Philip

--
View this message in context: http://n4.nabble.com/Upload-Images-in-Seperate-Deployment-tp584617p585435.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.


--
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




--
Phani. S
M.Tech(Software Engineering)
Motilal Nehru National Institute of Technology
(+91) 9010093398


--
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