Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Dec. 9, 2010 08:20:13

Sithembewena L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


Hi guys,

I have a form where I use a FileField to upload a file to the server and
this works fine on my local machine.

However, my live application fails to upload the file (ie the FileField is
empty in the database after uploading, and the file is not uploaded).

I know this is a pot shot, but would anybody have an idea what is going on?



--
Regards,
Sithembewena Lloyd Dube

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Dec. 9, 2010 08:23:40

Sithembewena L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


PS: I also a have a separate model which is using an ImageField subclass to
upload an avatar. On my development machine, I can edit a record and change
the thumbnail without issues. On the live server, nice the thumbnail is
saved it cannot be changed.

Ideas?

On Thu, Dec 9, 2010 at 10:20 AM, Sithembewena Lloyd Dube
<zebr...@gmail.com>wrote:

> Hi guys,
>
> I have a form where I use a FileField to upload a file to the server and
> this works fine on my local machine.
>
> However, my live application fails to upload the file (ie the FileField is
> empty in the database after uploading, and the file is not uploaded).
>
> I know this is a pot shot, but would anybody have an idea what is going on?
>
>
>
> --
> Regards,
> Sithembewena Lloyd Dube
>



--
Regards,
Sithembewena Lloyd Dube

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Dec. 9, 2010 09:43:05

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


On Thu, 2010-12-09 at 10:20 +0200, Sithembewena Lloyd Dube wrote:
> However, my live application fails to upload the file (ie the
> FileField is
> empty in the database after uploading, and the file is not uploaded).

path problem or permission problem
--
regards
Kenneth Gonsalves

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Dec. 9, 2010 09:50:16

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


On Thu, 2010-12-09 at 15:11 +0530, Kenneth Gonsalves wrote:
> On Thu, 2010-12-09 at 10:20 +0200, Sithembewena Lloyd Dube wrote:
> > However, my live application fails to upload the file (ie the
> > FileField is
> > empty in the database after uploading, and the file is not
> uploaded).
>
> path problem or permission problem

I am assuming the filefield is optional
--
regards
Kenneth Gonsalves

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Dec. 9, 2010 10:01:40

Sithembewena L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


Hi Kenneth,

The FileField is optional indeed. Surely it should be populated where a file
is provided though?

Update: turns out I have not installed the PIL on my staging server. Am
doing so now and retesting. this may well turn out to be a PEBKAC :)

Thanks.

On Thu, Dec 9, 2010 at 11:46 AM, Kenneth Gonsalves <law...@au-kbc.org>wrote:

> On Thu, 2010-12-09 at 15:11 +0530, Kenneth Gonsalves wrote:
> > On Thu, 2010-12-09 at 10:20 +0200, Sithembewena Lloyd Dube wrote:
> > > However, my live application fails to upload the file (ie the
> > > FileField is
> > > empty in the database after uploading, and the file is not
> > uploaded).
> >
> > path problem or permission problem
>
> I am assuming the filefield is optional
> --
> regards
> Kenneth Gonsalves
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>


--
Regards,
Sithembewena Lloyd Dube

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 Dec. 9, 2010 10:47:52

Sithembewena L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


Issue isolated. The uploads are going into the MEDIA_ROOT, which is the
'media' folder in my app.

The MEDIA_URL is pointing to a location outside of the project.

Is it proper/ feasible to save media to and serve it from, a media folder
outside of the project?

On Thu, Dec 9, 2010 at 12:01 PM, Sithembewena Lloyd Dube
<zebr...@gmail.com>wrote:

> Hi Kenneth,
>
> The FileField is optional indeed. Surely it should be populated where a
> file is provided though?
>
> Update: turns out I have not installed the PIL on my staging server. Am
> doing so now and retesting. this may well turn out to be a PEBKAC :)
>
> Thanks.
>
>
> On Thu, Dec 9, 2010 at 11:46 AM, Kenneth Gonsalves <law...@au-kbc.org>wrote:
>
>> On Thu, 2010-12-09 at 15:11 +0530, Kenneth Gonsalves wrote:
>> > On Thu, 2010-12-09 at 10:20 +0200, Sithembewena Lloyd Dube wrote:
>> > > However, my live application fails to upload the file (ie the
>> > > FileField is
>> > > empty in the database after uploading, and the file is not
>> > uploaded).
>> >
>> > path problem or permission problem
>>
>> I am assuming the filefield is optional
>> --
>> regards
>> Kenneth Gonsalves
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>>http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> Regards,
> Sithembewena Lloyd Dube
>



--
Regards,
Sithembewena Lloyd Dube

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#7 Dec. 9, 2010 10:59:38

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


On Thu, 2010-12-09 at 12:47 +0200, Sithembewena Lloyd Dube wrote:
> Is it proper/ feasible to save media to and serve it from, a media
> folder
> outside of the project?

it is proper - as this will not come under version control whereas the
project will
--
regards
Kenneth Gonsalves

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#8 Dec. 9, 2010 11:42:53

Sithembewena L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


Thanks Kenneth, am trying to figure out how to set the MEDIA_ROOT to the
folder outside the project.



On Thu, Dec 9, 2010 at 12:58 PM, Kenneth Gonsalves <law...@au-kbc.org>wrote:

> On Thu, 2010-12-09 at 12:47 +0200, Sithembewena Lloyd Dube wrote:
> > Is it proper/ feasible to save media to and serve it from, a media
> > folder
> > outside of the project?
>
> it is proper - as this will not come under version control whereas the
> project will
> --
> regards
> Kenneth Gonsalves
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>


--
Regards,
Sithembewena Lloyd Dube

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#9 Dec. 9, 2010 11:46:57

Kenneth G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


On Thu, 2010-12-09 at 13:42 +0200, Sithembewena Lloyd Dube wrote:
> Thanks Kenneth, am trying to figure out how to set the MEDIA_ROOT to
> the
> folder outside the project.

/home/lloyd/smedia/ and make it writable by the webserver
--
regards
Kenneth Gonsalves

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#10 Dec. 9, 2010 12:57:55

Sithembewena L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

File upload fail on live server


Thanks Kenneth. I tried your recommendation, the file is not uploaded at
all. I'm stumped by this, as
the folder is writable by apache. I will post on here when I do implement a
fix.

On Thu, Dec 9, 2010 at 1:46 PM, Kenneth Gonsalves <law...@au-kbc.org> wrote:

> On Thu, 2010-12-09 at 13:42 +0200, Sithembewena Lloyd Dube wrote:
> > Thanks Kenneth, am trying to figure out how to set the MEDIA_ROOT to
> > the
> > folder outside the project.
>
> /home/lloyd/smedia/ and make it writable by the webserver
> --
> regards
> Kenneth Gonsalves
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>


--
Regards,
Sithembewena Lloyd Dube

--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 12th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support