# Picture upload - picture gets chopped

**URL:** <https://www.ruby-forum.com/t/picture-upload-picture-gets-chopped/55142>\
**Category:** Rails\
**Created:** [March 17, 2006, 10:04am UTC](https://www.ruby-forum.com/t/picture-upload-picture-gets-chopped/55142 "2006-03-17T10:04:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JJJJJJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@JJJJJJ](https://www.ruby-forum.com/u/JJJJJJ)\
**Post date:** [March 17, 2006, 10:04am UTC](https://www.ruby-forum.com/t/picture-upload-picture-gets-chopped/55142/1 "2006-03-17T10:04:25Z")

</div>

I implemented the picture upload code from the AWDWR-book.(where it  
saves the picture to blob-field in db).

It worked well on my windows-box, but now I exported my code to  
Linux-box and when the picture is uploaded, it gets cut. Only the upper  
30 % of the picture file is saved to db.

Any ideas how to fix this?

By the way, the windows-version of the MySQL Query Browser was able to  
show the picture from the blob-field. Now on the linux it can’t show the  
picture, but just some binary data.

---

<div class="post-metadata">

**Author:** ![JJJJJJ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@JJJJJJ](https://www.ruby-forum.com/u/JJJJJJ)\
**Post date:** [March 17, 2006, 4:32pm UTC](https://www.ruby-forum.com/t/picture-upload-picture-gets-chopped/55142/2 "2006-03-17T16:32:35Z")

</div>

it’s probably your db. are you storing into a blob, medium blob, or long  
blob? they each have different size limits.

JJ wrote:

> I implemented the picture upload code from the AWDWR-book.(where it  
> saves the picture to blob-field in db).
> 
> It worked well on my windows-box, but now I exported my code to  
> Linux-box and when the picture is uploaded, it gets cut. Only the upper  
> 30 % of the picture file is saved to db.
> 
> Any ideas how to fix this?
> 
> By the way, the windows-version of the MySQL Query Browser was able to  
> show the picture from the blob-field. Now on the linux it can’t show the  
> picture, but just some binary data.
