Created
December 5, 2010 21:25
-
-
Save gmarik/729481 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bills = [ | |
{:name=>"bill[attachment]", | |
:filename=>"/data/data/com.rhomobile.imageupload/rhodata/apps/rhoconfig.txt"}, | |
{:name=>"bill[amount]", | |
:body=>nil}] | |
Rho::AsyncHttp.upload_file( | |
:url => 'http://localhost:3000/bills.json', | |
:callback => url_for(:action => :push_callback), | |
:multipart => bills) | |
# the problem is probaly here: https://github.com/rhomobile/rhodes/blob/59c19e246b5df732d9c9269648f366a0c5912e26/platform/shared/net/AsyncHttp.cpp#L138 | |
# Zero length body makes rhodes switch to else case and set content-type. | |
# I believe it has to be all the other way: | |
#If (file) | |
# set content type | |
# else # means body | |
# blank content type | |
# end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment