How To Upload A File And Save The File in eXist Not A Temp Directory

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

How To Upload A File And Save The File in eXist Not A Temp Directory

Randy Smith-9
All,
Looking for a way to upload a file like in the Upload example but I want
the whole file stored in eXist as a Word.docx or PDF or whatever. The
Upload example stores the file in a "temp" directory under Tomcat but I
want the whole file stored in eXist.
Any help appreciated.
Randy



--
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: How To Upload A File And Save The File in eXist Not A Temp Directory

Hank Ratzesberger
Randy,

Have you tried to use the the REST interface to eXist to
PUT the resource?

http://exist-db.org/devguide_rest.html#N102DC

If the url generator can resolve the file
(it can use the oxf: and I think file: protocols) in order
to load into an instance, then you can use the submission
processor to put to exist:

http://www.orbeon.com/ops/doc/processors-submission#http-put

Let us know...

--Hank

On Jul 22, 2009, at 3:11 PM, Randy Smith wrote:

> All,
> Looking for a way to upload a file like in the Upload example but I  
> want the whole file stored in eXist as a Word.docx or PDF or  
> whatever. The Upload example stores the file in a "temp" directory  
> under Tomcat but I want the whole file stored in eXist.
> Any help appreciated.
> Randy
>
>
> --
> 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
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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: How To Upload A File And Save The File in eXist Not A Temp Directory

stacyladnier
Attempting to do something similar. In the code below, the location of
the temporary file is located in the output of the Request processor
(request/parameters/parameter/value). Using the URL generator, how do I
access the #request to pull the name and location of the temporary file?



     <p:processor name="oxf:request">
         <p:input name="config">
             <config>
                 <include>/request/content-type</include>
                 <include>/request/content-length</include>
                 <include>/request/headers</include>
                 <include>/request/parameters</include>
             </config>
         </p:input>
         <p:output name="data" id="request"/>
     </p:processor>


     <p:processor name="oxf:url-generator">
         <p:input name="config">
             <config>
          <url>**Need file name from #request here**</url>
                 <content-type>application/xml</content-type>
             </config>
         </p:input>
         <p:output name="data" id="xml"/>
     </p:processor>

     <p:processor name="oxf:xmldb-insert">
        <p:input name="datasource" href="../services/datasource.xml"/>
        <p:input name="query">
          <xdb:insert collection="/db/orbeon/test"/>
        </p:input>
        <p:input name="data" href="#xml"/>
     </p:processor>



Hank Ratzesberger said the following on 7/23/2009 6:45 PM:

> Randy,
>
> Have you tried to use the the REST interface to eXist to
> PUT the resource?
>
> http://exist-db.org/devguide_rest.html#N102DC
>
> If the url generator can resolve the file
> (it can use the oxf: and I think file: protocols) in order
> to load into an instance, then you can use the submission
> processor to put to exist:
>
> http://www.orbeon.com/ops/doc/processors-submission#http-put
>
> Let us know...
>
> --Hank
>
> On Jul 22, 2009, at 3:11 PM, Randy Smith wrote:
>
>> All,
>> Looking for a way to upload a file like in the Upload example but I
>> want the whole file stored in eXist as a Word.docx or PDF or whatever.
>> The Upload example stores the file in a "temp" directory under Tomcat
>> but I want the whole file stored in eXist.
>> Any help appreciated.
>> Randy
>>
>>
>> --
>> 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
>
> Hank Ratzesberger
> NEES@UCSB
> Institute for Crustal Studies,
> University of California, Santa Barbara
> 805-893-8042
>
>
>
>
>


--
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: Re: How To Upload A File And Save The File in eXist Not A Temp Directory

Erik Bruchez
Administrator
In Form Runner, we do this entirely in XForms. See:

http://tinyurl.com/mmuq98

Look for the fr-create-update-attachment-submission submission, which
performs a binary submission based on the temp URL stored in the
instance.

-Erik

On Fri, Jul 24, 2009 at 8:03 AM, Stacy Ladnier<[hidden email]> wrote:

> Attempting to do something similar. In the code below, the location of the
> temporary file is located in the output of the Request processor
> (request/parameters/parameter/value). Using the URL generator, how do I
> access the #request to pull the name and location of the temporary file?
>
>
>
>    <p:processor name="oxf:request">
>        <p:input name="config">
>            <config>
>                <include>/request/content-type</include>
>                <include>/request/content-length</include>
>                <include>/request/headers</include>
>                <include>/request/parameters</include>
>            </config>
>        </p:input>
>        <p:output name="data" id="request"/>
>    </p:processor>
>
>
>    <p:processor name="oxf:url-generator">
>        <p:input name="config">
>            <config>
>                <url>**Need file name from #request here**</url>
>                <content-type>application/xml</content-type>
>            </config>
>        </p:input>
>        <p:output name="data" id="xml"/>
>    </p:processor>
>
>    <p:processor name="oxf:xmldb-insert">
>        <p:input name="datasource" href="../services/datasource.xml"/>
>        <p:input name="query">
>                <xdb:insert collection="/db/orbeon/test"/>
>        </p:input>
>        <p:input name="data" href="#xml"/>
>    </p:processor>
>
>
>
> Hank Ratzesberger said the following on 7/23/2009 6:45 PM:
>>
>> Randy,
>>
>> Have you tried to use the the REST interface to eXist to
>> PUT the resource?
>>
>> http://exist-db.org/devguide_rest.html#N102DC
>>
>> If the url generator can resolve the file
>> (it can use the oxf: and I think file: protocols) in order
>> to load into an instance, then you can use the submission
>> processor to put to exist:
>>
>> http://www.orbeon.com/ops/doc/processors-submission#http-put
>>
>> Let us know...
>>
>> --Hank
>>
>> On Jul 22, 2009, at 3:11 PM, Randy Smith wrote:
>>
>>> All,
>>> Looking for a way to upload a file like in the Upload example but I want
>>> the whole file stored in eXist as a Word.docx or PDF or whatever. The Upload
>>> example stores the file in a "temp" directory under Tomcat but I want the
>>> whole file stored in eXist.
>>> Any help appreciated.
>>> Randy
>>>
>>>
>>> --
>>> 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
>>
>> Hank Ratzesberger
>> NEES@UCSB
>> Institute for Crustal Studies,
>> University of California, Santa Barbara
>> 805-893-8042
>>
>>
>>
>>
>>
>
>
> --
> 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
>
>


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