You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ProAdmin Dariusz Dwornikowski <da...@proadmin.com.pl> on 2008/08/27 18:55:17 UTC

Multiple file upload

Hi,

I encountered such problem:

I got a news editing page and I would like to be able to upload as
many files as I want. I can do a form with ex. 5 file uploading
fields, but that limits me to 5 ofc.
Is it possible to do such thing, that when i upload one file, I can
trigger a second upload, and so on... (like in gmail web app).
How to pass it to the page object ? Is it possible at all? Any hints?



-- 
Pozdrawiam,
	Dariusz Dwornikowski
------------------------------------
ProAdmin
ul. Królowej Jadwigi 44/2
61-872 Poznań
tel: 061 623-20-92
kom: 0601 59-64-74
fax: 061 623-20-93
www.proadmin.com.pl
dariusz.dwornikowski@proadmin.com.pl

Re: Multiple file upload

Posted by ProAdmin Dariusz Dwornikowski <da...@proadmin.com.pl>.
Yeah I will try do something like that. I can see a problem to put the
files ( paths) to the object i want - along with data from form - in
my case a sports news.

2008/8/28 Thiago HP <th...@gmail.com>:
> On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis <ch...@bellsouth.net> wrote:
>> The tricky part unfortunately is dealing with T5. I don't know how you
>> can create new components on the fly.
>
> You just cannot do that. Tapestry 5' mantra is "Static Structure,
> Dynamic Behavior".
> One way to do it would be putting your form inside a zone. Then submit
> the form to do the first file uploading. The form would show the list
> of already uploaded files (if any) and show the file upload component
> again.
>
> Thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Pozdrawiam,
	Dariusz Dwornikowski
------------------------------------
ProAdmin
ul. Królowej Jadwigi 44/2
61-872 Poznań
tel: 061 623-20-92
kom: 0601 59-64-74
fax: 061 623-20-93
www.proadmin.com.pl
dariusz.dwornikowski@proadmin.com.pl

Re: Multiple file upload

Posted by ProAdmin Dariusz Dwornikowski <da...@proadmin.com.pl>.
Images and pdf/doc/odt. I will use this swfupload, but have no idea how to
pass the filenames to teh class controlling page, so i can put them into my
model.

W dniu 30 sierpnia 2008 18:07 użytkownik Toby Hobson <
toby.hobson@googlemail.com> napisał:

> I'm not sure what type of file you wish to upload but I have successfully
> used the Aurigma image uploader with my T5 application
>
> Toby
>
> 2008/8/30 ProAdmin Dariusz Dwornikowski <
> dariusz.dwornikowski@proadmin.com.pl>
>
> > Great ! Thanks. Tell me how to take filename from this to Page variable
> and
> > Ill be happy.
> >
> > 2008/8/30 Imants Firsts <im...@inbox.lv>
> >
> > > If you don't mind introducing the dependency to a flash component, then
> > > look at this:
> > > http://www.swfupload.org/
> > >
> > > I have successfully created a tapestry component using SWFUpload, which
> > > supports multiple file upload and degrades to default single file
> upload
> > if
> > > Flash is not present.
> > >
> > >
> > > Quoting Thiago HP <th...@gmail.com>:
> > > > On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis
> > > > <ch...@bellsouth.net> wrote:
> > > > > The tricky part unfortunately is dealing with T5. I don't know how
> > > > you
> > > > > can create new components on the fly.
> > > >
> > > > You just cannot do that. Tapestry 5' mantra is "Static Structure,
> > > > Dynamic Behavior".
> > > > One way to do it would be putting your form inside a zone. Then
> submit
> > > > the form to do the first file uploading. The form would show the list
> > > > of already uploaded files (if any) and show the file upload component
> > > > again.
> > > >
> > > > Thiago
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Pozdrawiam,
> > Dariusz Dwornikowski
> > ------------------------------------
> > ProAdmin
> > ul. Królowej Jadwigi 44/2
> > 61-872 Poznań
> > tel: 061 623-20-92
> > kom: 0601 59-64-74
> > fax: 061 623-20-93
> > www.proadmin.com.pl
> > dariusz.dwornikowski@proadmin.com.pl
> >
>



-- 
Pozdrawiam,
Dariusz Dwornikowski
------------------------------------
ProAdmin
ul. Królowej Jadwigi 44/2
61-872 Poznań
tel: 061 623-20-92
kom: 0601 59-64-74
fax: 061 623-20-93
www.proadmin.com.pl
dariusz.dwornikowski@proadmin.com.pl

Re: Multiple file upload

Posted by Toby Hobson <to...@googlemail.com>.
I'm not sure what type of file you wish to upload but I have successfully
used the Aurigma image uploader with my T5 application

Toby

2008/8/30 ProAdmin Dariusz Dwornikowski <
dariusz.dwornikowski@proadmin.com.pl>

> Great ! Thanks. Tell me how to take filename from this to Page variable and
> Ill be happy.
>
> 2008/8/30 Imants Firsts <im...@inbox.lv>
>
> > If you don't mind introducing the dependency to a flash component, then
> > look at this:
> > http://www.swfupload.org/
> >
> > I have successfully created a tapestry component using SWFUpload, which
> > supports multiple file upload and degrades to default single file upload
> if
> > Flash is not present.
> >
> >
> > Quoting Thiago HP <th...@gmail.com>:
> > > On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis
> > > <ch...@bellsouth.net> wrote:
> > > > The tricky part unfortunately is dealing with T5. I don't know how
> > > you
> > > > can create new components on the fly.
> > >
> > > You just cannot do that. Tapestry 5' mantra is "Static Structure,
> > > Dynamic Behavior".
> > > One way to do it would be putting your form inside a zone. Then submit
> > > the form to do the first file uploading. The form would show the list
> > > of already uploaded files (if any) and show the file upload component
> > > again.
> > >
> > > Thiago
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Pozdrawiam,
> Dariusz Dwornikowski
> ------------------------------------
> ProAdmin
> ul. Królowej Jadwigi 44/2
> 61-872 Poznań
> tel: 061 623-20-92
> kom: 0601 59-64-74
> fax: 061 623-20-93
> www.proadmin.com.pl
> dariusz.dwornikowski@proadmin.com.pl
>

Re: Multiple file upload

Posted by ProAdmin Dariusz Dwornikowski <da...@proadmin.com.pl>.
Great ! Thanks. Tell me how to take filename from this to Page variable and
Ill be happy.

2008/8/30 Imants Firsts <im...@inbox.lv>

> If you don't mind introducing the dependency to a flash component, then
> look at this:
> http://www.swfupload.org/
>
> I have successfully created a tapestry component using SWFUpload, which
> supports multiple file upload and degrades to default single file upload if
> Flash is not present.
>
>
> Quoting Thiago HP <th...@gmail.com>:
> > On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis
> > <ch...@bellsouth.net> wrote:
> > > The tricky part unfortunately is dealing with T5. I don't know how
> > you
> > > can create new components on the fly.
> >
> > You just cannot do that. Tapestry 5' mantra is "Static Structure,
> > Dynamic Behavior".
> > One way to do it would be putting your form inside a zone. Then submit
> > the form to do the first file uploading. The form would show the list
> > of already uploaded files (if any) and show the file upload component
> > again.
> >
> > Thiago
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Pozdrawiam,
Dariusz Dwornikowski
------------------------------------
ProAdmin
ul. Królowej Jadwigi 44/2
61-872 Poznań
tel: 061 623-20-92
kom: 0601 59-64-74
fax: 061 623-20-93
www.proadmin.com.pl
dariusz.dwornikowski@proadmin.com.pl

Re: Multiple file upload

Posted by Imants Firsts <im...@inbox.lv>.
If you don't mind introducing the dependency to a flash component, then look at this:
http://www.swfupload.org/

I have successfully created a tapestry component using SWFUpload, which supports multiple file upload and degrades to default single file upload if Flash is not present.


Quoting Thiago HP <th...@gmail.com>:
> On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis
> <ch...@bellsouth.net> wrote:
> > The tricky part unfortunately is dealing with T5. I don't know how
> you
> > can create new components on the fly.
> 
> You just cannot do that. Tapestry 5' mantra is "Static Structure,
> Dynamic Behavior".
> One way to do it would be putting your form inside a zone. Then submit
> the form to do the first file uploading. The form would show the list
> of already uploaded files (if any) and show the file upload component
> again.
> 
> Thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Multiple file upload

Posted by Thiago HP <th...@gmail.com>.
On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis <ch...@bellsouth.net> wrote:
> The tricky part unfortunately is dealing with T5. I don't know how you
> can create new components on the fly.

You just cannot do that. Tapestry 5' mantra is "Static Structure,
Dynamic Behavior".
One way to do it would be putting your form inside a zone. Then submit
the form to do the first file uploading. The form would show the list
of already uploaded files (if any) and show the file upload component
again.

Thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Multiple file upload

Posted by Chris Lewis <ch...@bellsouth.net>.
>From the front end, multi file uploads must be done using JS to create
additional file input elements on the fly. Uploading them "via AJAX" is
all about perception, as you can't actually do it since the JS would
need to stream the bytes of the selected files (which is of course not
allowed). The pure HTML/JS way to implement this is by having an iframe
that actually points to another page with the form. Using JS, you can
submit that form and emit notifications to the containing page when the
page in the frame reloads. Throw in a little CSS and you end up with
what looks and feels like an AJAX file upload (this is exactly how
gmail's smooth upload works).

The tricky part unfortunately is dealing with T5. I don't know how you
can create new components on the fly. It's not as easy as just creating
a new element in pure JS, since the containing T5 form will need to know
about that component and how to bind a value to it. Input on this
subject is sorely needed.

chris

Lance Java wrote:
> The html file object only supports 1 file at a time, it's also locked down
> by browser security so you can't set the value via javascript.
> To upload multiple files you can either use multiple file objects with some
> user friendly javascript or use an applet or a flash component.
>
> I've seen some open source multi-upload applets floating about... have never
> used one though.
> Facebook for example uses an applet to upload multiple photos
>
> 2008/8/28 Massimo Lusetti <ml...@gmail.com>
>
>   
>> On Thu, Aug 28, 2008 at 5:08 PM, ProAdmin Dariusz Dwornikowski
>> <da...@proadmin.com.pl> wrote:
>>
>>     
>>> I think some major ajax has to be used.
>>>       
>> Look into Component Reference on Tapestry5 documentation site
>>
>>
>> --
>> Massimo
>> http://meridio.blogspot.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>   

-- 
http://thegodcode.net


Re: Multiple file upload

Posted by Lance Java <la...@googlemail.com>.
The html file object only supports 1 file at a time, it's also locked down
by browser security so you can't set the value via javascript.
To upload multiple files you can either use multiple file objects with some
user friendly javascript or use an applet or a flash component.

I've seen some open source multi-upload applets floating about... have never
used one though.
Facebook for example uses an applet to upload multiple photos

2008/8/28 Massimo Lusetti <ml...@gmail.com>

> On Thu, Aug 28, 2008 at 5:08 PM, ProAdmin Dariusz Dwornikowski
> <da...@proadmin.com.pl> wrote:
>
> > I think some major ajax has to be used.
>
> Look into Component Reference on Tapestry5 documentation site
>
>
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Multiple file upload

Posted by Massimo Lusetti <ml...@gmail.com>.
On Thu, Aug 28, 2008 at 5:25 PM, ProAdmin Dariusz Dwornikowski
<da...@proadmin.com.pl> wrote:

> Can somebody confirm it is a good direction?

Doesn't the ajax and form related component help you?

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Multiple file upload

Posted by ProAdmin Dariusz Dwornikowski <da...@proadmin.com.pl>.
Yes I know the page, I keep it open all the time. Im juts new to
tapestry and do not know how to 'bite' it. That is why I wrote here.
Today I will try to wirte some component to have multiple upload.

What I invented is such scenrio:

I get Button (Upload), when i click it and choose file, the file gets
uploaded to server or session maybe, without submit.
After that is done, second button appears and so on.

Can somebody confirm it is a good direction?


2008/8/28 Massimo Lusetti <ml...@gmail.com>:
> On Thu, Aug 28, 2008 at 5:08 PM, ProAdmin Dariusz Dwornikowski
> <da...@proadmin.com.pl> wrote:
>
>> I think some major ajax has to be used.
>
> Look into Component Reference on Tapestry5 documentation site
>
>
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Pozdrawiam,
	Dariusz Dwornikowski
------------------------------------
ProAdmin
ul. Królowej Jadwigi 44/2
61-872 Poznań
tel: 061 623-20-92
kom: 0601 59-64-74
fax: 061 623-20-93
www.proadmin.com.pl
dariusz.dwornikowski@proadmin.com.pl

Re: Multiple file upload

Posted by Massimo Lusetti <ml...@gmail.com>.
On Thu, Aug 28, 2008 at 5:08 PM, ProAdmin Dariusz Dwornikowski
<da...@proadmin.com.pl> wrote:

> I think some major ajax has to be used.

Look into Component Reference on Tapestry5 documentation site


-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Multiple file upload

Posted by ProAdmin Dariusz Dwornikowski <da...@proadmin.com.pl>.
I think some major ajax has to be used.

2008/8/28 Szemere Szemere <sz...@googlemail.com>:
> I don't have a solution to this, but would also be interested to hear of
> one.
>



-- 
Pozdrawiam,
	Dariusz Dwornikowski
------------------------------------
ProAdmin
ul. Królowej Jadwigi 44/2
61-872 Poznań
tel: 061 623-20-92
kom: 0601 59-64-74
fax: 061 623-20-93
www.proadmin.com.pl
dariusz.dwornikowski@proadmin.com.pl

Re: Multiple file upload

Posted by Szemere Szemere <sz...@googlemail.com>.
I don't have a solution to this, but would also be interested to hear of
one.