Re: Help with error uploading files

2012-11-08 Thread Carlos Aguilar
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

Re: Help with error uploading files

2012-11-08 Thread Carlos Aguilar
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 projec

Help with error uploading files

2012-11-07 Thread Carlos Aguilar
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' I not have idea what is causin

Re: Libraries for generating URL of uploading files in Django

2012-06-01 Thread Kurtis Mullins
Check out django-storages (if you use off-site hosting like S3, Rackspace Files, etc...). Then, just request the ImageField or FileField's .url() method. I think this may be the case for the bulit-in ImageField and FileField as well (actually, I'm pretty sure it is) but I haven't used it in so lon

Libraries for generating URL of uploading files in Django

2012-06-01 Thread First Rock
Need to develop a project for file uploading and generating its(files's) URL, which could be shared. Are there any particular libraries or simple means in Python,(Django) that would be handy and efficient.? ~ Newbie trying a Herculean Task~ Thanks in Advance :) -- You received this message becaus

Re: Confused about uploading files (Cannot force both insert and updating in model saving)

2011-06-06 Thread Roy Smith
> >    if form.is_valid(): > >             f = request.FILES['file'] > >             data_set = DataSet() > >             data_set.save('foo', f) > > I suspect this is the problem: you create an empty instnce of DataSet > and then call its save method. model.save has three optional arguments > [1]

Re: Confused about uploading files (Cannot force both insert and updating in model saving)

2011-06-06 Thread Michal Petrucha
On Sun, Jun 05, 2011 at 07:18:24PM -0700, Roy Smith wrote: > I'm trying to figure out how to upload a file. I've got a model that > looks like: > > class DataSet(models.Model): > file = models.FileField(upload_to='data/%Y/%m/%d') > > and my view method is: > > def create_data_set(request):

Re: Confused about uploading files (Cannot force both insert and updating in model saving)

2011-06-05 Thread Kenneth Gonsalves
On Sun, 2011-06-05 at 19:18 -0700, Roy Smith wrote: > ctx = {'form': form} > ctx.update(csrf(request)) indent these two lines -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Googl

Confused about uploading files (Cannot force both insert and updating in model saving)

2011-06-05 Thread Roy Smith
I'm trying to figure out how to upload a file. I've got a model that looks like: class DataSet(models.Model): file = models.FileField(upload_to='data/%Y/%m/%d') and my view method is: def create_data_set(request): if request.method == 'POST': form = DataSetForm(request.POST,

Uploading files with FormPreview

2010-06-18 Thread Jacob Fenwick
Does FormPreview support uploading files? I imagine I would need to override the templates to change the form enctype and override the validation view so that it will check for request.FILES, but is there a way to do this easily? Or will it just be an ugly, hacky mess that's not worth emba

admin: uploading files problem

2009-11-28 Thread Heronman
Hello, all I'm a newbie in django, and I have a problem with uploading files in django admin after submitting a form with FileField or ImageField, if a file is bigger than ~100KB, my browser tell me "sending a request..." and then nothing happens. and nothing happens on

Re: uploading files

2009-02-17 Thread Tonu Mikk
Karen Tracey wrote: > On Tue, Feb 17, 2009 at 11:50 AM, Tonu Mikk > wrote: > > Alex Gaynor wrote: > > > Uploaded files have a name attribute that contains their name. > Yes, but how does one take advantage of that in this code? > > > You simply use the name attri

Re: uploading files

2009-02-17 Thread Karen Tracey
On Tue, Feb 17, 2009 at 11:50 AM, Tonu Mikk wrote: > Alex Gaynor wrote: > > Uploaded files have a name attribute that contains their name. > Yes, but how does one take advantage of that in this code? > You simply use the name attribute of the UploadedFile instance you are working with. For exam

Re: uploading files

2009-02-17 Thread Tonu Mikk
Alex Gaynor wrote: > > > On Tue, Feb 17, 2009 at 11:18 AM, Tonu Mikk <mailto:tm...@umn.edu>> wrote: > > > Hi Django community, > > I have a question regarding uploading files. In this page in Django > documentation > > http://docs

Re: uploading files

2009-02-17 Thread Alex Gaynor
On Tue, Feb 17, 2009 at 11:18 AM, Tonu Mikk wrote: > > Hi Django community, > > I have a question regarding uploading files. In this page in Django > documentation > > http://docs.djangoproject.com/en/dev/topics/http/file-uploads/#topics-http-file-uploads > , > ther

uploading files

2009-02-17 Thread Tonu Mikk
Hi Django community, I have a question regarding uploading files. In this page in Django documentation http://docs.djangoproject.com/en/dev/topics/http/file-uploads/#topics-http-file-uploads, there is an example of handling an uploaded file like so: def handle_uploaded_file(f

Re: UnicodeDecodeError when uploading files with non-ascii characters in filename

2008-11-27 Thread gnijholt
Thanks for the quick reply. I almost gave up, but I just found something that seems to work for me. So I've tried: --- filename = codecs.BOM_UTF8.decode(postfile['filename']) --- ...which gave a LookupError. Then I tried casting to Unicode: --- filename = unicode(postfile['filename']) --- ...whi

Re: UnicodeDecodeError when uploading files with non-ascii characters in filename

2008-11-26 Thread Malcolm Tredinnick
On Wed, 2008-11-26 at 06:20 -0800, gnijholt wrote: > Hello, > > I'm running Django r7548 using PostgreSQL 8.3 on Leopard. > The problem: When I upload a file with a filename like '.jpg', I > get the following error: > --- > UnicodeDecodeError at /library/documents/12114/addFile/ > 'ascii' c

UnicodeDecodeError when uploading files with non-ascii characters in filename

2008-11-26 Thread gnijholt
Hello, I'm running Django r7548 using PostgreSQL 8.3 on Leopard. The problem: When I upload a file with a filename like '.jpg', I get the following error: --- UnicodeDecodeError at /library/documents/12114/addFile/ 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

Re: Uploading files to subdirectories

2008-05-16 Thread Mike Hjorleifsson
what happens in your example if sally has a holiday.rtf ? On May 16, 3:00 am, James McGill <[EMAIL PROTECTED]> wrote: > Hi All, > I'm new to Django and I'm not sure how best to achieve the following: > > Users may upload files - each uploaded file is tied to a user in the > database using a Fore

Re: Uploading files to subdirectories

2008-05-16 Thread Sergio
Hello James, You can do that following this: http://code.djangoproject.com/wiki/CustomUploadAndFilters It uses signals to customize the upload path. James McGill escribió: > Hi All, > I'm new to Django and I'm not sure how best to achieve the following: > > Users may upload files - each upload

Uploading files to subdirectories

2008-05-16 Thread James McGill
Hi All, I'm new to Django and I'm not sure how best to achieve the following: Users may upload files - each uploaded file is tied to a user in the database using a ForeignKey. In order to prevent pain to the underlying O/S I don't want to put all these files in to a single directory. I could sep

Re: Uploading files

2007-09-14 Thread Russell Keith-Magee
On 9/14/07, Dushyant Sharma <[EMAIL PROTECTED]> wrote: > > def thing_add(request): > if request.method == 'POST': > new_data = request.POST.copy() > new_data.update(request.FILES) This example is incorrect for the current trunk version of Django. You don't update the request.F

Re: Uploading files

2007-09-14 Thread Dushyant Sharma
class ThingForm(forms.Form): name = forms.CharField(max_length=30, required=True, label=_('Name of the thing')) photo = forms.Field(widget=forms.FileInput, required=False, label=_('Photo'), help_text=_('Upload an image (max %s kilobytes)' % settings.MAX_PHOTO_UPLOAD_SIZE)) def thing_add(

Re: Uploading files

2007-09-14 Thread Jarek Zgoda
Jarek Zgoda napisał(a): >> I am using Django 0.97 pre in winxp. database is mysql. Please >> forgive any errors or if I am not clear with some aspects as I am a >> beginner trying to learn django. I am trying to upload a file: an >> image. I am not worried about validation now. I want to know ho

Re: Uploading files

2007-09-14 Thread Jarek Zgoda
AniNair napisał(a): > I am using Django 0.97 pre in winxp. database is mysql. Please > forgive any errors or if I am not clear with some aspects as I am a > beginner trying to learn django. I am trying to upload a file: an > image. I am not worried about validation now. I want to know how to do

Uploading files

2007-09-14 Thread AniNair
Hello, I am using Django 0.97 pre in winxp. database is mysql. Please forgive any errors or if I am not clear with some aspects as I am a beginner trying to learn django. I am trying to upload a file: an image. I am not worried about validation now. I want to know how to do this. I tried to do th

Re: 500 Errors when uploading files (with FastCGI)

2007-06-26 Thread Dirk van Oosterbosch, IR labs
Replying myself to add some information and ask some extra questions. I just had contact with the maintainer of my shared host. He warned that memory exceeding the (shared usage) limit could cause strange errors. And that memory usage should be dealt with carefully. He adviced me to save the u

Strange Errors with FastCGI when uploading files

2007-06-26 Thread Dirk van Oosterbosch, IR labs
Hi All, I deployed an app with uploading functionality to a server running FastCGI. When I had it tested by my users, the site became completely unresponsive, returning nothing but Error 500's. In the log I find a lot of these: Unhandled exception in thread started by > Traceback (most recent

Re: Uploading Files

2006-09-10 Thread Andres Luga
Hi, relarted to this topic. When using generic views, how to achieve that the file doesn't get overwritten? For example a form for editing a person: the image file field has no default data and when I only change the name the image is blanked. It seems I missed something.. Regards, Andres > htt

Re: Uploading Files

2006-09-08 Thread Andy Dustman
On 9/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > how can I upload file to /media/images/1.jpg with Django? Start here: http://www.djangoproject.com/documentation/model_api/#imagefield If the admin interface is sufficient for you, you're done. Note that this requires an object/row per

Uploading Files

2006-09-08 Thread [EMAIL PROTECTED]
Hello, how can I upload file to /media/images/1.jpg with Django? Thak you for help. P.S. Sorry for may bad English ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se