Re: Help with error uploading files

44 views
Skip to first unread message

Carlos Aguilar

unread,
Nov 8, 2012, 12:58:33 PM11/8/12
to django...@googlegroups.com
Yesterday doing few test I note that the problem is causes by the following configs

DEFAULT_FILE_STORAGE = 'waitress.apps.venues.storage.CachedS3BotoStorage'
DEFAULT_S3_PATH = "media"

I test 2 file storages one is s3_folder_storages.s3.DefaultStorages.

I am using the same config in other project without problems.

I will appreciate your help
Message has been deleted

Carlos Aguilar

unread,
Nov 8, 2012, 2:29:00 PM11/8/12
to django...@googlegroups.com
The screenshot is captured with chrome extension, then, capture all page and save to png.

The problem is caused by s3_folder_storages. I am replacing the DEFAULT_FILE_STORAGE bY s3boto storage.

I think as field is ImageField png or jpg are valid images

Best Regards


On Thu, Nov 8, 2012 at 1:21 PM, Dennis Lee Bieber <wlf...@ix.netcom.com> wrote:
On Wed, 7 Nov 2012 21:10:06 -0800 (PST), Carlos Aguilar
<darka...@gmail.com> declaimed the following in
gmane.comp.python.django.user:

> Hello,
>
> I am working in a project that requires you upload an image in a model. The
> project was started by other developer.
>
> Today testing, without realize changes in the model I am receiving the
> following error:
>
> 'cStringIO.StringO' object has no attribute 'size'

        Is that a cut&paste? If it is, I suspect a typo...

>
> I not have idea what is causing the error, then I appreciate your help to
> fix this.
>
> One screenshot of the error:
>
> <https://lh6.googleusercontent.com/-duPf2J5ejnI/UJs-gygXKgI/AAAAAAAACDA/SmKl6Zk2sPM/s1600/waitress-error.png>

        What type of screen are you using... Even at "full view" my browser
shows ant droppings... The text lines are TWO PIXELS tall!

Not to mention you called it a PNG file, but that site is displaying a
JPEG.
--
        Wulfraed                 Dennis Lee Bieber         AF6VN
        wlf...@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

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




--
Carlos Aguilar
Consultor Hardware y Software
DWD&Solutions
http://www.dwdandsolutions.com

Carlos Aguilar

unread,
Nov 8, 2012, 3:14:02 PM11/8/12
to django-users
As I solved the problem this is the solution:

The problem was caused by the settings GZIP_CONTENT_TYPES that includes content-types for png, jpg and gif images. I want upload images to S3 using gzip compression, but this not works for MEDIA content only for STATIC content.

I created a custom backend to upload the media files to S3 that not use the content-types from images in his GZIP_CONTENT_TYPES settings.

Best Regards
Reply all
Reply to author
Forward
0 new messages