Good morning, Would guys be kind and share these codes, please? Not re-inventing the whell, you know.
Thanks in advance & best regards, Pierre On Wed, Nov 14, 2012 at 10:51 AM, Martin Grigorov <mgrigo...@apache.org>wrote: > Hi, > > I've just added a new article at > http://wicketinaction.com/2012/11/uploading-files-to-wicket-iresource/that > shows how to integrate such JavaScript file upload widgets with Wicket. > I hope it is useful for you! > > > On Wed, Oct 24, 2012 at 1:54 PM, heapifyman <heapify...@gmail.com> wrote: > > > Thanks. That helped a lot. > > > > > > 2012/10/16 Bas Gooren <b...@iswd.nl> > > > > > Behavior (wicket 1.5): http://pastebin.com/WUHsiRL2 > > > instance.js (to initialize uploadify): http://pastebin.com/jGSwzHMN > > > > > > Mount it in Application.init() with: > > > > > > // Allow uploads through uploadify > > > mount( new UploadifyBehavior.Uploader( "/uploadify" ) ); > > > > > > Use it like this: > > > > > > component.add( new UploadifyBehavior() > > > { > > > > > > @Override > > > protected void onUpload( UploadInfo info, > > > AjaxRequestTarget target ) > > > { > > > // Handle upload any way you like, and replace > stuff > > > in this ajax request > > > } > > > > > > } ); > > > > > > > > > Met vriendelijke groet, > > > Kind regards, > > > > > > Bas Gooren > > > > > > Op 16-10-2012 19:09, schreef heapifyman: > > > > > >> Thanks. > > >> Would you mind sharing the mounted resource's code? I'm not completely > > >> sure > > >> how to implement that. > > >> > > >> > > >> 2012/10/16 Bas Gooren <b...@iswd.nl> > > >> > > >> Hi! > > >>> > > >>> We use a different uploader (uploadify), but the basics are the same. > > >>> > > >>> What we've built for this is a behavior which renders the UI for the > > >>> uploader, and handles ajax callbacks. > > >>> > > >>> The uploader uploads to a mounted resource (e.g. at /uploadify), > which > > >>> has > > >>> an internal cache (UUID => FileInfo). > > >>> After a successful upload, the upload resource returns the UUID; > > >>> The javascript onComplete handler then calls the ajax behavior with > the > > >>> UUID parameter, which allows other components in the page to respond > to > > >>> the > > >>> upload. > > >>> > > >>> To prevent overflow in the uploader cache we use a map with a maximum > > >>> size > > >>> which evicts old entries on overflow. > > >>> > > >>> Met vriendelijke groet, > > >>> Kind regards, > > >>> > > >>> Bas Gooren > > >>> > > >>> Op 16-10-2012 12:59, schreef heapifyman: > > >>> > > >>> Not sure if I understand. > > >>> > > >>>> As far as I got it, the upload plugin requires some "web service" > that > > >>>> accepts POST and DELETE requests to add/remove uploaded files. > > >>>> Doing that is no problem, I guess. > > >>>> But how to I link this with the current user's wicket session so > that > > I > > >>>> know which files the users uploaded when finally the form is > > submitted? > > >>>> I'm not sure if I'm using the right wording here. Hope you get the > > >>>> idea... > > >>>> > > >>>> > > >>>> 2012/10/16 Martin Grigorov <mgrigo...@apache.org> > > >>>> > > >>>> Hi, > > >>>> > > >>>>> Is it an option to upload to a IResource and store the uploaded > data > > >>>>> the same way as if you'd do in the page ? > > >>>>> > > >>>>> On Tue, Oct 16, 2012 at 12:49 PM, heapifyman <heapify...@gmail.com > > > > >>>>> wrote: > > >>>>> > > >>>>> Hello, > > >>>>>> > > >>>>>> has anyone tried yet to integrate blueimp's jQuery File Upload > > >>>>>> http://blueimp.github.com/****jQuery-File-Upload/< > > http://blueimp.github.com/**jQuery-File-Upload/> > > >>>>>> <http://**blueimp.github.com/jQuery-**File-Upload/< > > http://blueimp.github.com/jQuery-File-Upload/>>with > > >>>>>> Wicket FileUpload? > > >>>>>> > > >>>>>> Especially in combination with additional input fields <input > > >>>>>> type=text"> > > >>>>>> I'm kind of stuck because I'm not really sure where to point the > > >>>>>> jquery > > >>>>>> file upload's url param to and how to store the uploaded files in > > the > > >>>>>> wicket page for saving them when the complete form is submitted. > > >>>>>> > > >>>>>> Any help would be appreciated. > > >>>>>> Thanks > > >>>>>> > > >>>>>> > > >>>>> -- > > >>>>> Martin Grigorov > > >>>>> jWeekend > > >>>>> Training, Consulting, Development > > >>>>> http://jWeekend.com > > >>>>> > > >>>>> > ------------------------------****----------------------------**--** > > >>>>> --------- > > >>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.**apa**che.org< > > http://apache.org> > > >>>>> <users-unsubscribe@**wicket.apache.org< > > users-unsubscr...@wicket.apache.org> > > >>>>> > > > >>>>> > > >>>>> For additional commands, e-mail: users-h...@wicket.apache.org > > >>>>> > > >>>>> > > >>>>> > > >>>>> > > > > > > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com <http://jweekend.com/> > -- Le bonheur n'est pas une destination, mais une façon de voyager. Papa d'une petite Lou-Ann depuis le 30 juin.