Uploading Files using Frapi

77 views
Skip to first unread message

dennis....@gmail.com

unread,
Feb 1, 2013, 10:18:36 AM2/1/13
to frapi-...@googlegroups.com
I am quite stuck here, not sure if this functionality just isn't functional yet in Frapi.

I am trying to upload a rather large file (high resolution photo) to a Frapi Webservice.  I can get it to work if I send it as a normal String Post parameter, but that requires me to buffer the entire file in memory on my client device (phone), which is problematic.  I am attempting to upload it as a Multipart File attachment, but I can't seem to access the parameter in the Action code on Frapi, it is just blank.  I have tried accessing it via the methods below, but both are blank.
$this->getParam('File', self::TYPE_FILE)
and
$this->getParam('File', self::TYPE_OUTPUT)

Here is an example of my upload request going to Frapi, everything is received by Frapi just fine, but the parameter is blank.
http://posttestserver.com/data/2013/02/01/06.52.36291662802

Any ideas?

Ernani Joppert Pontes Martins

unread,
Feb 1, 2013, 11:10:26 AM2/1/13
to frapi-...@googlegroups.com
Good question, that's also my doubt!

Actually some servers also do restrict the amount of data you send
over a PUT / DELETE request, so it is nice to know how we can follow
the verbs rule without impacting the actual real needs of the app.

That's a must know for a great API design.

Cheers,

Ernani
> --
> You received this message because you are subscribed to the Google Groups
> "frapi-general" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to frapi-genera...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

dennis....@gmail.com

unread,
Feb 1, 2013, 4:43:26 PM2/1/13
to frapi-...@googlegroups.com, dennis....@gmail.com
Turns out this is actually a bug, I reported this as an issue and a fix has already been worked on.

Ernani Joppert Pontes Martins

unread,
Feb 1, 2013, 5:17:34 PM2/1/13
to frapi-...@googlegroups.com, dennis....@gmail.com
Thanks for keeping us posted here!

Cheers,

Ernani
Reply all
Reply to author
Forward
0 new messages