Safari Issue

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

Safari Issue

Park, Michael

Hi

 

I am running the XForms engine in my java app.   Therefore, I have a controller Servlet which performs a response.sendRedirect(“path_to_my_xforms_jsp”).

 

It works fine in FF, IE  and Safari for Win.  But on Safari for the Mac  it causes an error in Orbeon: “the request was rejected because it's size is unknown”.

The stack references the fileupload package: “org.apache.commons.fileupload.FileUploadBase$UnknownSizeException”.

 

I’ve found that it sends along a content-type of “multipart/form-data; boundary=----WebKitFormBoundaryzF2E8z9Rb+gz8DQW”.  It seems like the browser is sending a multipart content-type which is making Orbeon think it’s a fileupload.

 

Does anyone have any idea what’s going on? 

 

Thanks,

Mike

 



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

Help with file-upload

masjab-2

Hey,

Can someone help understand how to organize a file upload...
I do have something like a dictionary  where a subscriber inserts/
edits entries...
Now I want to make it possible to upload files like pdf/jpg to an  
entrie. I used the "upload control" from the example page but I don´t  
know how to design this, because it´s my first time working with a xml  
database..(exist)

if my entry looks like
  <entry>
  <category/>
  <meaning/>
  ..
  ..
  </entry>

How can I connect the uploaded file to this entry?


THX





--
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: Help with file-upload

Alessandro Vernet
Administrator
On Thu, May 22, 2008 at 2:41 PM, Masen J <[hidden email]> wrote:

> Can someone help understand how to organize a file upload...
> I do have something like a dictionary  where a subscriber inserts/edits
> entries...
> Now I want to make it possible to upload files like pdf/jpg to an entrie. I
> used the "upload control" from the example page but I don´t know how to
> design this, because it´s my first time working with a xml database..(exist)
>
> if my entry looks like
>  <entry>
>  <category/>
>  <meaning/>
>  ..
>  ..
>  </entry>
>
> How can I connect the uploaded file to this entry?
What will the uploaded file contain? Maybe an image for the entry you
are defining? In which case you would have an element entry/image and
would bind the upload control to that element. Or am I
misunderstanding your question?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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: Help with file-upload

masjab-2
Hey Alex, 
you are right!
I want to upload images to an entry.
The entries are stored in exist and when a student searches for a dictinaryentry he should be able to see the data, that is stored in the exist database...
Right now I´m able to create this dictEntry with an orbeon form(thx to the bookcast example) and write it to exist...every entry creates a {id}.xml file.
But I don´t know how to connect the uploaded files to my entry.

<?xml version="1.0" encoding="UTF-8"?>
<entries xmlns="">
    <entry>
        <id>1</id>
        <lemma/>
        <category/>
        <root/>
        <meaning>
            <description> </description>
            <source>
                <kindOfSource/>
                <nameOfSource/>
            </source>
        </meaning>
        <do I have to put an element for the uploaded files here>
<file>test.jpg</file>
<file>test2.jpg</file>
        </do I have to put an element for the uploaded files here>
    </entry>
</entries>
 



Am 23.05.2008 um 00:19 schrieb Alessandro Vernet:

On Thu, May 22, 2008 at 2:41 PM, Masen J <[hidden email]> wrote:
Can someone help understand how to organize a file upload...
I do have something like a dictionary  where a subscriber inserts/edits
entries...
Now I want to make it possible to upload files like pdf/jpg to an entrie. I
used the "upload control" from the example page but I don´t know how to
design this, because it´s my first time working with a xml database..(exist)

if my entry looks like
<entry>
<category/>
<meaning/>
..
..
</entry>

How can I connect the uploaded file to this entry?

What will the uploaded file contain? Maybe an image for the entry you
are defining? In which case you would have an element entry/image and
would bind the upload control to that element. Or am I
misunderstanding your question?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Help with file-upload

Alessandro Vernet
Administrator
On Thu, May 22, 2008 at 4:20 PM, Masen J <[hidden email]> wrote:
>         <do I have to put an element for the uploaded files here>
> <file>test.jpg</file>
> <file>test2.jpg</file>
>         </do I have to put an element for the uploaded files here>

Yes, you do need an additional element for the file. The element that
contain the file will be just other elements that contain other
information about the entry, and the simplest thing is to store the
file encoded in base64. You can have additional attribute or
sub-elements to store the file name, size, etc, if you to store those.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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: Re: Help with file-upload

masjab-2
Cool,
thank you!!!
I´ll update my schema for the file...
But can you tell me, if there is a "how to" or an "example"...
Then I can try by myself bacause I still do not know what the orbeon-
upload does...
Do I have to look up those information about the encoding in "orbeon"  
or in "exist"?


Am 23.05.2008 um 02:20 schrieb Alessandro Vernet:

> On Thu, May 22, 2008 at 4:20 PM, Masen J <[hidden email]> wrote:
>>        <do I have to put an element for the uploaded files here>
>> <file>test.jpg</file>
>> <file>test2.jpg</file>
>>        </do I have to put an element for the uploaded files here>
>
> Yes, you do need an additional element for the file. The element that
> contain the file will be just other elements that contain other
> information about the entry, and the simplest thing is to store the
> file encoded in base64. You can have additional attribute or
> sub-elements to store the file name, size, etc, if you to store those.
>
> Alex
> --
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet
>
> --
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Help with file-upload

Erik Bruchez
Administrator
We have an upload example:

   http://www.orbeon.com/ops/xforms-upload/

Also see this recent blog entry:

   http://www.orbeon.com/blog/2008/04/14/image-display-and-upload-with-xforms-11/

-Erik

On May 23, 2008, at 4:42 AM, Masen J wrote:

> Cool,
> thank you!!!
> I´ll update my schema for the file...
> But can you tell me, if there is a "how to" or an "example"...
> Then I can try by myself bacause I still do not know what the orbeon-
> upload does...
> Do I have to look up those information about the encoding in  
> "orbeon" or in "exist"?
>
>
> Am 23.05.2008 um 02:20 schrieb Alessandro Vernet:
>
>> On Thu, May 22, 2008 at 4:20 PM, Masen J <[hidden email]> wrote:
>>>       <do I have to put an element for the uploaded files here>
>>> <file>test.jpg</file>
>>> <file>test2.jpg</file>
>>>       </do I have to put an element for the uploaded files here>
>>
>> Yes, you do need an additional element for the file. The element that
>> contain the file will be just other elements that contain other
>> information about the entry, and the simplest thing is to store the
>> file encoded in base64. You can have additional attribute or
>> sub-elements to store the file name, size, etc, if you to store  
>> those.
>>
>> Alex
>> --
>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>> Orbeon's Blog: http://www.orbeon.com/blog/
>> Personal Blog: http://avernet.blogspot.com/
>> Twitter - http://twitter.com/avernet
>>
>> --
>> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: Help with file-upload

masjab-2
hey erik,
I read the article and used the code, but still I do not understand,  
where my image goes...


<entry>
     <id>28</id>
     <category>Logic</category>
     <files>
            file:/Tomcat_/work/Catalina/localhost/exist/cocoon-files/
cache-dir/upload_00000473.tmp
     </files>
</entry>

this is how my xml output looks like, but my image is not uploaded to  
the database and I can´t see it anywhere...




Am 24.05.2008 um 01:32 schrieb Erik Bruchez:

> We have an upload example:
>
>  http://www.orbeon.com/ops/xforms-upload/
>
> Also see this recent blog entry:
>
>  http://www.orbeon.com/blog/2008/04/14/image-display-and-upload-with-xforms-11/
>
> -Erik
>
> On May 23, 2008, at 4:42 AM, Masen J wrote:
>
>> Cool,
>> thank you!!!
>> I´ll update my schema for the file...
>> But can you tell me, if there is a "how to" or an "example"...
>> Then I can try by myself bacause I still do not know what the  
>> orbeon-upload does...
>> Do I have to look up those information about the encoding in  
>> "orbeon" or in "exist"?
>>
>>
>> Am 23.05.2008 um 02:20 schrieb Alessandro Vernet:
>>
>>> On Thu, May 22, 2008 at 4:20 PM, Masen J <[hidden email]> wrote:
>>>>      <do I have to put an element for the uploaded files here>
>>>> <file>test.jpg</file>
>>>> <file>test2.jpg</file>
>>>>      </do I have to put an element for the uploaded files here>
>>>
>>> Yes, you do need an additional element for the file. The element  
>>> that
>>> contain the file will be just other elements that contain other
>>> information about the entry, and the simplest thing is to store the
>>> file encoded in base64. You can have additional attribute or
>>> sub-elements to store the file name, size, etc, if you to store  
>>> those.
>>>
>>> Alex
>>> --
>>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>>> Orbeon's Blog: http://www.orbeon.com/blog/
>>> Personal Blog: http://avernet.blogspot.com/
>>> Twitter - http://twitter.com/avernet
>>>
>>> --
>>> 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.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


--
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: Re: Re: Re: Re: Help with file-upload

Alessandro Vernet
Administrator
On Fri, May 23, 2008 at 5:28 PM, Masen J <[hidden email]> wrote:
>    <files>
>
> file:/Tomcat_/work/Catalina/localhost/exist/cocoon-files/cache-dir/upload_00000473.tmp
>    </files>
> </entry>
>
> this is how my xml output looks like, but my image is not uploaded to the
> database and I can´t see it anywhere...

Adding a bind to specify that the type of <files> is xs:base64Binary
should do the trick. See
http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-upload.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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: Safari Issue

Alessandro Vernet
Administrator
In reply to this post by Park, Michael
Mike,

On Wed, May 21, 2008 at 1:55 PM, Park, Michael <[hidden email]> wrote:

> I am running the XForms engine in my java app.   Therefore, I have a
> controller Servlet which performs a
> response.sendRedirect("path_to_my_xforms_jsp").
>
>
>
> It works fine in FF, IE  and Safari for Win.  But on Safari for the Mac  it
> causes an error in Orbeon: "the request was rejected because it's size is
> unknown".
>
> The stack references the fileupload package:
> "org.apache.commons.fileupload.FileUploadBase$UnknownSizeException".
We are doing quite a bit of testing on Safari for the Mac, but haven't
hit that one yet. What version of Safari have you been using? Would it
be possible for you to send us some code that we can run locally to
reproduce this?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


--
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: Safari Issue

Park, Michael
Alex,

It's version 3.1.1 (5525.18) on OS X (10.5.2).  I realize I left one
piece of information out.  There is an upload form with a redirect to my
controller servlet.

What I noticed when outputting the header information is that the
content-type is the following:
        multipart/form-data;
boundary=----WebKitFormBoundaryh5zkbcqGQq1mM8NC

For some reason only Safari for the Mac on a redirect sends this
content-type which is what causes the problem.

Here is a test form with the redirect:
        http://riker.services.brown.edu:8080/repository/test.html


Thanks,
Mike

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Alessandro Vernet
Sent: Sunday, June 01, 2008 7:59 PM
To: [hidden email]
Subject: [ops-users] Re: Safari Issue

Mike,

On Wed, May 21, 2008 at 1:55 PM, Park, Michael
<[hidden email]> wrote:
> I am running the XForms engine in my java app.   Therefore, I have a
> controller Servlet which performs a
> response.sendRedirect("path_to_my_xforms_jsp").
>
>
>
> It works fine in FF, IE  and Safari for Win.  But on Safari for the
Mac  it
> causes an error in Orbeon: "the request was rejected because it's size
is
> unknown".
>
> The stack references the fileupload package:
> "org.apache.commons.fileupload.FileUploadBase$UnknownSizeException".

We are doing quite a bit of testing on Safari for the Mac, but haven't
hit that one yet. What version of Safari have you been using? Would it
be possible for you to send us some code that we can run locally to
reproduce this?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet


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