Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Sending Binary Data?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Logan Capaldo" data-source="post: 4506986"><p>--Apple-Mail-11--359922324</p><p>Content-Transfer-Encoding: 7bit</p><p>Content-Type: text/plain;</p><p>charset=US-ASCII;</p><p>delsp=yes;</p><p>format=flowed</p><p></p><p></p><p></p><p></p><p>try deleting the .chomp. Jpg's aren't really line oriented anyway.</p><p>Also if you are on windows not opening the file in binary mode will</p><p>wreak also sorts of havoc. As an alternative try this:</p><p></p><p>a = File.open("lighter.jpg", "rb") { |f| f.read }</p><p></p><p></p><p>--Apple-Mail-11--359922324--</p></blockquote><p></p>
[QUOTE="Logan Capaldo, post: 4506986"] --Apple-Mail-11--359922324 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed try deleting the .chomp. Jpg's aren't really line oriented anyway. Also if you are on windows not opening the file in binary mode will wreak also sorts of havoc. As an alternative try this: a = File.open("lighter.jpg", "rb") { |f| f.read } --Apple-Mail-11--359922324-- [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Sending Binary Data?
Top