# ActionWebService... how to return base64?

**URL:** <https://www.ruby-forum.com/t/actionwebservice-how-to-return-base64/162600>\
**Category:** Rails\
**Created:** [March 11, 2009, 7:03pm UTC](https://www.ruby-forum.com/t/actionwebservice-how-to-return-base64/162600 "2009-03-11T19:03:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveybaby](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c57346/32.png) [@steveybaby](https://www.ruby-forum.com/u/steveybaby)\
**Post date:** [March 11, 2009, 7:03pm UTC](https://www.ruby-forum.com/t/actionwebservice-how-to-return-base64/162600/1 "2009-03-11T19:03:35Z")

</div>

Hello friends…

I’m hoping MY thread has more responses than other AWS threads I’ve  
found in my searches.

Anyway, I’m returning a Track object, defined by this schema:

create\_table “tracks”, :force =\> true do |t|  
t.string “name”  
t.integer “user\_id”, :limit =\> 11  
t.binary “track\_data”  
t.binary “warn\_data”  
t.boolean “published”  
t.datetime “created\_at”  
t.datetime “updated\_at”  
t.integer “background\_id”, :limit =\> 11  
end

It works great… except that AWS 2.1.0 (from datanoise -  
[http://github.com/datanoise/actionwebse](http://github.com/datanoise/actionwebse) â€¦ ree/master) seems to be  
interpreting my binary data as STRING! It is being returned as  
datadatadata. This is a huge problem as it causes  
issues with the parser, as the binary data is not being encoded in  
base64 prior to being output (I think).

Anyway I would really appreciate some help. How can I force my binary  
columns to be output as base64?

Thanks folks!

-Steve
