FileUpload question

8 views
Skip to first unread message

Mitch

unread,
Sep 25, 2008, 10:16:52 PM9/25/08
to Cappuccino & Objective-J
After a quick review of the classes I am attempting to build an
application that uploads an image from a users desktop.
I may be missing something very easy but I do not see any classes
related to an open/file selector dialog action.

Has anyone built this type of support into a class? Or does anyone
have any helpful hint on how to implement this in pure Objective-J?

Thanks

Mitch

Ross Boucher

unread,
Sep 26, 2008, 2:46:26 AM9/26/08
to objec...@googlegroups.com
Hey Mitch,

Although this hasn't made it into Cappuccino proper (needs a bit more
abstraction), this is the code we use in 280 Slides:

http://gist.github.com/11652

You need to set the URL on it, and you can also add parameters to it,
and you submit with the submit method.

The file is sent with the param name "file", and there are a few
delegate methods (search the code for [_delegate ).

Feel free to ask questions about this on the list, or in IRC

-Ross

Mitch

unread,
Sep 26, 2008, 5:03:50 PM9/26/08
to Cappuccino & Objective-J
Ross,

Thanks for the pointer and the code...

So I have the button somewhat working.
The delegate is connected up..
I can open a file dialog
I can call submit
But for some reason the POST that gets sent does not have the file
data attached?

Is there something I am missing... If you have a snippet of code that
you could share on how to properly set up the UploadButton instance
that would be a great
help

Thanks

Mitch
Reply all
Reply to author
Forward
0 new messages