# Image upload (apache2.0+ lighttpd)

**URL:** <https://www.ruby-forum.com/t/image-upload-apache2-0-lighttpd/50223>\
**Category:** Rails\
**Created:** [December 14, 2005, 11:58am UTC](https://www.ruby-forum.com/t/image-upload-apache2-0-lighttpd/50223 "2005-12-14T11:58:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@sylow](https://www.ruby-forum.com/u/sylow)\
**Post date:** [December 14, 2005, 11:58am UTC](https://www.ruby-forum.com/t/image-upload-apache2-0-lighttpd/50223/1 "2005-12-14T11:58:42Z")

</div>

Hello all,

I use lighttpd 1.4.8 and I have a problem with image uploads.

I tried file\_upload plugin, but it is strangely working sometimes and  
refuse to work sometimes.

Function in the controller is (@user is loaded in before\_filter)

def update\_watermark  
@user.watermark = params[:user][:watermark]  
@user.save  
redirect\_to :action =\> “index”  
end

Model is

file\_column :watermark

and my view is

\<%= file\_column\_field “user”, “watermark”, :size=\>10,  
:style=\>“float:left;width:100px” %\>

Error I got is;  
The proxy server received an invalid response from an upstream server.  
The proxy server could not handle the request POST /myXC/update\_avatar.

Reason: Error reading from remote server

If I try lighttpd without apache, it never times out and waits for  
server’s response.

So any guess?  
Thanks in advance  
Gokhan

---

<div class="post-metadata">

**Author:** ![sylow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@sylow](https://www.ruby-forum.com/u/sylow)\
**Post date:** [December 14, 2005, 9:04pm UTC](https://www.ruby-forum.com/t/image-upload-apache2-0-lighttpd/50223/2 "2005-12-14T21:04:42Z")

</div>

Are you using \<form … enctype=“multipart/form-data”\> ?

---

<div class="post-metadata">

**Author:** ![sylow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@sylow](https://www.ruby-forum.com/u/sylow)\
**Post date:** [December 14, 2005, 9:17pm UTC](https://www.ruby-forum.com/t/image-upload-apache2-0-lighttpd/50223/3 "2005-12-14T21:17:51Z")

</div>

Yep that is not an issue

And when I try on My Mac OS X, it works right now (strange I am not sure  
if I like it yet), can it be a problem with lighttpd 1.4.7? we are  
upgrading it to 1.4.8.

Kyle M. wrote:

> Are you using \<form … enctype=“multipart/form-data”\> ?

---

<div class="post-metadata">

**Author:** ![sylow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e8c25b/32.png) [@sylow](https://www.ruby-forum.com/u/sylow)\
**Post date:** [December 14, 2005, 10:11pm UTC](https://www.ruby-forum.com/t/image-upload-apache2-0-lighttpd/50223/4 "2005-12-14T22:11:13Z")

</div>

Sorry, I have no idea… I’d be interested to hear about the  
resolution, when it happens.
