Re: File Upload with additional Parameters

2020-10-11 Thread Dvs Khamele
Hi do you hire contract based python/django freelancer? We can help you in this and related tasks at fair prices. Reply or send email to divy...@pythonmate.com Best Regards, Divyesh Khamele, Pythonmate On Fri, 9 Oct 2020, 11:20 pm Noel Simela, wrote: > Hi guys, > > Any suggestions on the best a

Re: file upload fails with slow network bandwith in django

2016-02-17 Thread Pablo Conesa
El martes, 16 de febrero de 2016, 21:12:32 (UTC+1), James Schneider escribió: > > How long does the file upload work before receiving the error? > There is no response from the server (fiddler returns -1, whatever this means) >>> >>> Well, no response from the server d

Re: file upload fails with slow network bandwith in django

2016-02-16 Thread James Schneider
> > How long does the file upload work before receiving the error? >>> >>> There is no response from the server (fiddler returns -1, whatever this >>> means) >>> >> >> Well, no response from the server doesn't necessarily mean that there >> were no logs. Can you check the error and access logs

Re: file upload fails with slow network bandwith in django

2016-02-16 Thread Pablo Conesa
Thanks once more James for your help and time. Answers below.. El martes, 16 de febrero de 2016, 8:33:08 (UTC+1), James Schneider escribió: > > > > On Mon, Feb 15, 2016 at 10:41 PM, Pablo Conesa > wrote: > >> Thanks James. answers in line: >> >> El lunes, 15 de febrero de 2016, 23:04:48 (UTC+1),

Re: file upload fails with slow network bandwith in django

2016-02-15 Thread James Schneider
On Mon, Feb 15, 2016 at 10:41 PM, Pablo Conesa wrote: > Thanks James. answers in line: > > El lunes, 15 de febrero de 2016, 23:04:48 (UTC+1), James Schneider > escribió: >> >> >> >> On Mon, Feb 15, 2016 at 10:20 AM, Pablo Conesa >> wrote: >> >>> Hi, I posted this in stackoverflow. Now I'm trying

Re: file upload fails with slow network bandwith in django

2016-02-15 Thread Pablo Conesa
Thanks James. answers in line: El lunes, 15 de febrero de 2016, 23:04:48 (UTC+1), James Schneider escribió: > > > > On Mon, Feb 15, 2016 at 10:20 AM, Pablo Conesa > wrote: > >> Hi, I posted this in stackoverflow. Now I'm trying here: >> http://stackoverflow.com/questions/35413649/file-upload-fai

Re: file upload fails with slow network bandwith in django

2016-02-15 Thread Pablo Conesa
Thanks Ezequiel, answer below. El lunes, 15 de febrero de 2016, 21:22:23 (UTC+1), Ezequiel Bertti escribió: > > You are using de runserver to develop and getting this error or something > like gunicorn and nginx? > In production we are using gunicorn, locally I don't use guinicorn, and in both

Re: file upload fails with slow network bandwith in django

2016-02-15 Thread James Schneider
On Mon, Feb 15, 2016 at 10:20 AM, Pablo Conesa wrote: > Hi, I posted this in stackoverflow. Now I'm trying here: > http://stackoverflow.com/questions/35413649/file-upload-fails-with-slow-network-bandwith-in-django > > I've got a code working fine that uploads a file to a DJANGO server. > > It wor

Re: file upload fails with slow network bandwith in django

2016-02-15 Thread Ezequiel Bertti
You are using de runserver to develop and getting this error or something like gunicorn and nginx? Because the nginx have some time to proccess each request. http://stackoverflow.com/questions/6816215/gunicorn-nginx-timeout-problem On Mon, Feb 15, 2016 at 4:20 PM, Pablo Conesa wrote: > Hi, I p

Re: File Upload in Django

2015-05-16 Thread Timothy W. Cook
The official docs are a good place to start https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/ This GitHub example is about the newest one available showing the changes in recent Django versions https://github.com/axelpale/minimal-django-file-upload-example On Sat, May 16, 2015 at

Re: File Upload, Download and Search Files

2015-03-04 Thread Vijay Khemlani
You can save files as part of models, for example using FileFields https://docs.djangoproject.com/en/1.7/ref/models/fields/#filefield Or you can handle them manually, for example using default_storage https://docs.djangoproject.com/en/1.7/topics/files/ Regarding File Search, I don't know, never

Re: File upload error

2015-02-25 Thread Amirouche Boubekki
Héllo again (at last) On Mon, Feb 16, 2015 at 11:20 AM Sola Chong wrote: > I having a error "*expected string or buffer*" when submit to upload > avatar when edit profile. Can't figure out what is the problem.. > I've setup a small project with your code (and small modifications) using django

Re: File upload error

2015-02-16 Thread Amirouche Boubekki
Héllo Sola, Can you post the full stacktrace not only the error? Regards On Mon Feb 16 2015 at 11:20:42 AM Sola Chong wrote: > I having a error "*expected string or buffer*" when submit to upload > avatar when edit profile. Can't figure out what is the problem.. > > *Model:* > class MyProfil

Re: File upload limits

2011-06-05 Thread Siddharth S
I'm running apache2 on the server. But as I mentioned, a parallel site based on PHP is able to take file uploads larger than 1Mb. So, I guess it isn't an apache configuration problem. On Sun, Jun 5, 2011 at 9:38 PM, ionic drive wrote: > This i guess is not a django setting. > Its a setting of yo

Re: File upload limits

2011-06-05 Thread ionic drive
This i guess is not a django setting. Its a setting of your webserver (Nginx, Apache2, etc.) If you do use Nginx as an example, this setting would be client_max_body_size. http://www.rockia.com/2011/01/how-to-change-nginx-file-upload-size-limit good luck scrapper On Sun, 2011-06-05 at 06:57 -

Re: File Upload fails

2011-03-17 Thread Matias Aguirre
You are missing the enctype form attribute needed for files input fields. Your form definition should be: Check http://www.w3.org/TR/html401/interact/forms.html#adef-enctype for details. Matías Excerpts from arapaho's message of Thu Mar 17 15:53:45 -0300 2011: > Hi, > > Rather new to Dja

Re: file upload size problem

2011-03-17 Thread vamsy krishna
Yes Tom, thanks. That makes sense. And yes it works like a charm on Opera. On Mar 17, 2:47 pm, Tom Evans wrote: > On Thu, Mar 17, 2011 at 6:51 AM, vamsy krishna wrote: > > That is true Michal. My understanding is that the server does send > > back a 413 response as soon as it finds the huge mism

Re: file upload size problem

2011-03-17 Thread Tom Evans
On Thu, Mar 17, 2011 at 6:51 AM, vamsy krishna wrote: > That is true Michal. My understanding is that the server does send > back a 413 response as soon as it finds the huge mismatch in the > upload limit and the actual upload size. Also I think the server > immediately terminates the connection f

Re: file upload size problem

2011-03-16 Thread vamsy krishna
That is true Michal. My understanding is that the server does send back a 413 response as soon as it finds the huge mismatch in the upload limit and the actual upload size. Also I think the server immediately terminates the connection for the request. The problem however is that the browser instead

Re: file upload size problem

2011-03-16 Thread Michal Petrucha
> > I've set a custom error page for the 413 error when the upload file > > size exceeds the maximum set in apache LimitRequestBody directive (500 > > KB). > > This is working fine for all files upto 3 MB. However when the size > > exceeds this limit, the browser is showing the below message instea

Re: file upload size problem

2011-03-15 Thread vamsy krishna
Any suggestions please? On Mar 15, 12:18 pm, vamsy krishna wrote: > Hi All, > > I've set a custom error page for the 413 error when the upload file > size exceeds the maximum set in apache LimitRequestBody directive (500 > KB). > This is working fine for all files upto 3 MB. However when the size

Re: file upload size problem

2011-03-15 Thread vamsy krishna
Hi All, I've set a custom error page for the 413 error when the upload file size exceeds the maximum set in apache LimitRequestBody directive (500 KB). This is working fine for all files upto 3 MB. However when the size exceeds this limit, the browser is showing the below message instead of my cus

Re: file upload size problem

2011-03-14 Thread vamsy krishna
Thanks Tom. I also looked up the Django code and realised there is no handler413 defined. I'm now doing it in apache the way you mentioned. On Mar 14, 4:38 pm, Tom Evans wrote: > On Mon, Mar 14, 2011 at 9:02 AM, vamsy krishna wrote: > > I'm facing a new problem now. I have a defined a custom err

Re: file upload size problem

2011-03-14 Thread Tom Evans
On Mon, Mar 14, 2011 at 9:02 AM, vamsy krishna wrote: > I'm facing a new problem now. I have a defined a custom error page and > using the handler413 in my urls file to load this template. However > this is not getting picked up. I would like to handle this at django > level instead of apache. The

Re: file upload size problem

2011-03-14 Thread vamsy krishna
I'm facing a new problem now. I have a defined a custom error page and using the handler413 in my urls file to load this template. However this is not getting picked up. I would like to handle this at django level instead of apache. The ErrorDocument definition in apache works fine. Also the handl

Re: file upload size problem

2011-03-13 Thread vamsy krishna
Oh yes. Thanks Karen. On Mar 12, 7:06 pm, Karen Tracey wrote: > On Sat, Mar 12, 2011 at 12:06 AM, vamsy krishna wrote: > > > I'm doing a file upload from one of my forms and writing the content > > to a temp file on the server. The problem is any file of size more > > than 250 KB is throwing the

Re: file upload size problem

2011-03-12 Thread Karen Tracey
On Sat, Mar 12, 2011 at 12:06 AM, vamsy krishna wrote: > I'm doing a file upload from one of my forms and writing the content > to a temp file on the server. The problem is any file of size more > than 250 KB is throwing the below error: > > Request Entity Too Large > The requested resource > /ter

Re: File Upload

2011-02-06 Thread vanderkerkoff
Thanks again Karen On Feb 6, 6:06 pm, Karen Tracey wrote: > On Sun, Feb 6, 2011 at 12:45 PM, vanderkerkoff wrote: > > I got it :-) > > > import os > > PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) > > > # MEDIA_ROOT = ( > > #       os.path.join(PROJECT_PATH, 'static/media/'), > > #

Re: File Upload

2011-02-06 Thread Karen Tracey
On Sun, Feb 6, 2011 at 12:45 PM, vanderkerkoff wrote: > I got it :-) > > import os > PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) > > # MEDIA_ROOT = ( > # os.path.join(PROJECT_PATH, 'static/media/'), > # ) > > MEDIA_ROOT = '/Users/mjdavies/Sites/django/governors/static/media/'

Re: File Upload

2011-02-06 Thread vanderkerkoff
I got it :-) import os PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) # MEDIA_ROOT = ( # os.path.join(PROJECT_PATH, 'static/media/'), # ) MEDIA_ROOT = '/Users/mjdavies/Sites/django/governors/static/media/' statically pointing the media root works I use the same method above t

Re: File Upload

2011-02-06 Thread vanderkerkoff
Hi Karen I promise you I'm changing the code that I'm displaying, I've been updating the app all day, just tying off some loose ends now. I've tried copying and pasting all the variables but it looks like garbage in dpaste. One thing that I'm not sure if right is the value of the the_file varia

Re: File Upload

2011-02-06 Thread Karen Tracey
On Sun, Feb 6, 2011 at 11:11 AM, vanderkerkoff wrote: > Hi Karen > > Thanks for getting back > > Here's the model def > > http://dpaste.com/391872/ > > I cut and pasted that model definition, plus the model admin shown earlier, into a test project, and I'm able to add Documents in the admin with

Re: File Upload

2011-02-06 Thread vanderkerkoff
Hiya both I'm outputting all the data types I'm saving now in a save in the admin.py, they're all strings :-( I'm going to kick myself when I find it On Feb 6, 4:11 pm, vanderkerkoff wrote: > Hi Karen > > Thanks for getting back > > Here's the model def > > http://dpaste.com/391872/ > > On F

Re: File Upload

2011-02-06 Thread vanderkerkoff
Hi Karen Thanks for getting back Here's the model def http://dpaste.com/391872/ On Feb 6, 3:33 pm, Karen Tracey wrote: > On Sun, Feb 6, 2011 at 9:50 AM, vanderkerkoff wrote: > > I'm trying to upload a file in a project, the app is called Documents, > > here's the admin.py > > > [snipped] >

Re: File Upload

2011-02-06 Thread Chris Hannam
Hi, startswith is usually a string method. Looks like something is calling .startwith() on a tuple rather than the expected string. When you instantiate your model are you certain all the values are correct? Try logging all the values before creating the model and look for a tuple where there shou

Re: File Upload

2011-02-06 Thread Karen Tracey
On Sun, Feb 6, 2011 at 9:50 AM, vanderkerkoff wrote: > I'm trying to upload a file in a project, the app is called Documents, > here's the admin.py > > [snipped] More interesting than the admin.py for this model would have been the model definition itself. > > I keep getting an error I don't un

Re: File upload fail on live server

2010-12-10 Thread Sithembewena Lloyd Dube
Good idea, Kenneth. I will do so. Thanks. On Fri, Dec 10, 2010 at 8:00 AM, Kenneth Gonsalves wrote: > On Thu, 2010-12-09 at 14:57 +0200, Sithembewena Lloyd Dube wrote: > > Thanks Kenneth. I tried your recommendation, the file is not uploaded > > at > > all. I'm stumped by this, as > > the folder

Re: File upload fail on live server

2010-12-09 Thread Kenneth Gonsalves
On Thu, 2010-12-09 at 14:57 +0200, Sithembewena Lloyd Dube wrote: > 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. > > do one thing - make the file re

Re: File upload fail on live server

2010-12-09 Thread Sithembewena Lloyd Dube
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 wrote: > On Thu, 2010-12-09 at 13:42 +0200, Sithembewena Lloyd

Re: File upload fail on live server

2010-12-09 Thread Kenneth Gonsalves
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 beca

Re: File upload fail on live server

2010-12-09 Thread Sithembewena Lloyd Dube
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 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 med

Re: File upload fail on live server

2010-12-09 Thread Kenneth Gonsalves
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 rece

Re: File upload fail on live server

2010-12-09 Thread Sithembewena Lloyd Dube
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, Sit

Re: File upload fail on live server

2010-12-09 Thread Sithembewena Lloyd Dube
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, Kenn

Re: File upload fail on live server

2010-12-09 Thread Kenneth Gonsalves
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 p

Re: File upload fail on live server

2010-12-09 Thread Kenneth Gonsalves
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 receiv

Re: File upload fail on live server

2010-12-09 Thread Sithembewena Lloyd Dube
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, Sithe

Re: File Upload Content Type Verification

2010-09-24 Thread Federico Capoano
Thanks. I'm concerned about the possibility of uploading and executing a script on the server. Just this. I think I can avoid this by hiding the file somewhere behind the public folder so the content is not accessible via http. On 24 Set, 13:31, Tom Evans wrote: > On Fri, Sep 24, 2010 at 12:23

Re: File Upload Content Type Verification

2010-09-24 Thread Tom Evans
On Fri, Sep 24, 2010 at 12:23 PM, Federico Capoano wrote: > I can't trust the user because this field will be used in the > frontend, which will be an app similar to the django admin, but much > more limited. > > So according to what you said, there is no standard way to do this. > the second solu

RE: Re: File Upload Content Type Verification

2010-09-24 Thread Henrik Genssen
to message: >date: 24.09.2010 06:23:55 >from: "Federico Capoano" >to: "Django users" >subject: Re: File Upload Content Type Verification > >I can't trust the user because this field will be used in the >frontend, which will be an app similar to the django

Re: File Upload Content Type Verification

2010-09-24 Thread Federico Capoano
I can't trust the user because this field will be used in the frontend, which will be an app similar to the django admin, but much more limited. So according to what you said, there is no standard way to do this. the second solution seems interesting. But what if I wanted to restrict to images?

Re: File Upload Content Type Verification

2010-09-24 Thread Tom Evans
On Fri, Sep 24, 2010 at 11:28 AM, Federico Capoano wrote: > Is there a way we can check if a certain file being uploaded is really > what it claims to be? > Let's say I want to restrict files to PDF only, then I take a php > script and I rename it PDF I can still upload it if using the > following

Re: File upload from python client to Django app

2010-06-21 Thread euan.godd...@googlemail.com
urllib2 can handle cookies and therefore you should be able to handle the login. It will probably be a fair bit of work to get the client to submit the various parts, but I'm sure I've seen some examples around on how to do such a thing. Euan On Jun 21, 3:52 pm, srn wrote: > Hello to all, > > I'

Re: File Upload with Progress Bar

2010-06-10 Thread Venkatraman S
I got this working with SWFUpload. I shall upload a test app which does this and update this thread. In the meantime, if you want some quick help, then let me know. or can refer to : http://github.com/naltimari/django-swfupload-samples -V- http://twitter.com/venkasub On Fri, Jun 4, 2010 at 4:41

Re: File Upload with Progress Bar

2010-06-04 Thread Venkatraman S
Anyone who wants to work on this problem with me? We can probably collaborate and release it over this weekend. On Fri, Jun 4, 2010 at 3:16 AM, Brad Pitcher wrote: > Some versions of flash have a bug that causes the entire browser to > freeze while uploading. I am afflicted by the bug, running

Re: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
Some versions of flash have a bug that causes the entire browser to freeze while uploading. I am afflicted by the bug, running Flash 10.0 r45 on Ubuntu 10.04. It seems that there is no good solution at the moment. My host is Webfaction and I just discovered that they have a non-configurable ngin

Re: File Upload with Progress Bar

2010-06-03 Thread Brad Pitcher
Whoops! Just read that the django dev server is not multithreaded so it will not work. But you should be able to use any web server along with an upload_progress view as long as your web server streams the upload in progress to django. I think my troubles may be because the web server isn't stre

Re: File Upload with Progress Bar

2010-06-03 Thread Venkatraman S
Oh yes! I was referring to a stand alone app. I heard someone complain #django that filebrowser aint working right after uploadify was introduced. Is that True? On Thu, Jun 3, 2010 at 8:11 PM, patrickk wrote: > http://code.google.com/p/django-filebrowser/ > > cheers, > patrick > > On 3 Jun., 16:

Re: File Upload with Progress Bar

2010-06-03 Thread patrickk
http://code.google.com/p/django-filebrowser/ cheers, patrick On 3 Jun., 16:10, Venkatraman S wrote: > Hi Patrick, > > Can you share a simple django app which uses Uploadify?  Did you use vanilla > Uploadify or django-uploadify(github.com/tstone/django-uploadify*)*? > I have been simply unable to

Re: File Upload with Progress Bar

2010-06-03 Thread Venkatraman S
Hi Patrick, Can you share a simple django app which uses Uploadify? Did you use vanilla Uploadify or django-uploadify(github.com/tstone/django-uploadify*)*? I have been simply unable to make it run. I also tried a django-uploadify, but no results! Frustrating it is. If you can share the code, i

Re: File Upload with Progress Bar

2010-06-03 Thread patrickk
you could use uploadify, see http://www.uploadify.com/. of course, it´s not an ideal solution since its flash-based. we´ve been using uploadify with django and the filebrowser for about a year now and it works quite well. regards, patrick On 3 Jun., 06:32, Venkatraman S wrote: > Tell me about

Re: File Upload with Progress Bar

2010-06-02 Thread Venkatraman S
Tell me about it! Its quite insane that there is no single-standard solution for this. I have been hanging around in #django for sometime and there is still opposition to flash based solution. Also, i have not been to get it working inspite of it being not an ideal solution. I hear that there are s

Re: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
Sort of, that's what the default is in the demo, but now I've noticed I have the same problem with apache progress reporting as I did using django progress reporting. It's behaving like it's not multi-threaded or something. It seems like I don't get any progress reports until the file has finishe

Re: File Upload with Progress Bar

2010-06-02 Thread Venkatraman S
Does this work with the Django development server? On Thu, Jun 3, 2010 at 8:13 AM, Brad Pitcher wrote: > Since I just spent much longer than it should have taken figuring this > out, I will try and help you out. I followed the instructions at the > provided link and it sort of worked. Not qui

Re: File Upload with Progress Bar

2010-06-02 Thread Brad Pitcher
Since I just spent much longer than it should have taken figuring this out, I will try and help you out. I followed the instructions at the provided link and it sort of worked. Not quite as well as I liked. I used Apache for the progress reporting, which the author doesn't mention in the article

Re: File Upload with Progress Bar

2010-05-30 Thread creecode
Hello V, On May 30, 12:23 pm, Venkatraman S wrote: > Can you share the project please? My progress bar code is integrated into a larger application which I'm unable to share at this time. I've put the progress bar feature on the back burner and unfortunately I don't have spare time to go in an

Re: File Upload with Progress Bar

2010-05-30 Thread Venkatraman S
HI creecode, Can you share the project please? I can probably work on it and see what is happening. Till now, i havent even been able to get this working. -V On Sun, May 30, 2010 at 10:45 PM, creecode wrote: > Hello V, > > On May 29, 11:00 pm, Venkatraman S wrote: > > > I have been trying to

Re: File Upload with Progress Bar

2010-05-30 Thread creecode
Hello V, On May 29, 11:00 pm, Venkatraman S wrote: > I have been trying to build a simple file upload with progress bar. AFAIK there isn't a simple solution. Perhaps this info < http://www.fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress-bars-jquery-django-nginx/ > will point you in

Re: file upload formset

2010-04-17 Thread Karen Tracey
On Sat, Apr 17, 2010 at 2:54 AM, Alfredo Alessandrini wrote: > profile.html > --- > > {{ formset }} > > > --- > > If I change 'course' or 'project' it's work. But if I try to upload a > file don't work. Any suggestion? > > First problem (might be last problem al

[solved]Re: file upload issue

2009-07-29 Thread Salvatore Leone
Again I found the answer... I forgot to put enctype="multipart/form-data" in my form... sorry for disturbing you. -S Salvatore Leone ha scritto: > Hello again, > > I know this is probably an already discussed question, but I can't get > out of this. I've got a form which may or may not send

Re: file upload issue

2009-07-29 Thread cootetom
Use a modal form for this which includes a file field that has required set to false. http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#topics-forms-modelforms http://docs.djangoproject.com/en/dev/ref/forms/fields/#filefield Easier to let django handle the request then figure it all

Re: File Upload : Memory consumption

2009-07-17 Thread Alvin
has anyone had luck getting past this? I am using a recent 1.1 beta release have checked the folder permissions and set the FILE_UPLOAD_TEMP_DIR all 777 code is at http://pastebin.com/m4332fdb2 On Jun 24, 2:06 pm, alecs wrote: > If to be honest I can't google this posts ... Most of the links a

Re: File Upload : Memory consumption

2009-06-24 Thread alecs
If to be honest I can't google this posts ... Most of the links are for patches or for old django versions :( Don't know, maybe I should try to set FILE_UPLOAD_MAX_MEMORY_SIZE, but I didn't change it , so the default value is 2.5Mb ... On Jun 24, 2:54 pm, John M wrote: > I've seen quite a few po

Re: File Upload : Memory consumption

2009-06-24 Thread alecs
The maximum size, in bytes, for files that will be uploaded into memory. Files larger than FILE_UPLOAD_MAX_MEMORY_SIZE will be streamed to disk. Defaults to 2.5 megabytes. My file size is greater than 2.5Mb, so it will be streamed to disk... --~--~-~--~~~---~--~~ Y

Re: File Upload : Memory consumption

2009-06-24 Thread Xavier Ordoquy
On Wed, 2009-06-24 at 03:20 -0700, alecs wrote: > Hi! I'm trying to upload a large file (700Mb) and something wrong with > django happens: First it starts caching enormously (4Gb of ram are > used), than it starts to purge caches and starts swapping (1Gb of swap > is used). > Have you ever faced w

Re: File Upload : Memory consumption

2009-06-24 Thread John M
I've seen quite a few posts on this, and I think it's documented as well. As I recall, there is a certain way of doing large uploads, search the docs and the forum and I'm sure you'll find it. On Jun 24, 3:20 am, alecs wrote: > Hi! I'm trying to upload a large file (700Mb) and something wrong w

Re: file upload docs obsolete?

2009-05-14 Thread msoulier
On May 14, 3:51 pm, msoulier wrote: > I looked here > > http://docs.djangoproject.com/en/dev/topics/http/file-uploads/ > > and it mentions request.FILES being a dictionary, but the 1.0 porting > guide here > > http://docs.djangoproject.com/en/dev/releases/1.0-porting-guide/ > > says otherwise. >

Re: File upload: how to validate file type

2009-03-29 Thread Torsten Bronger
Hallöchen! Torsten Bronger writes: > I'd like to ensure that people only upload PDF files, so the file > must start with "%PDF". If the file starts with something else, > the form must not validate. > > How do I do that? I though about a clean_... method which reads > the start of the file and

Re: File upload: how to validate file type

2009-03-29 Thread Torsten Bronger
Hallöchen! P M writes: > yes you can, because signature of pdf is in the starting of 1st > chunk of stream... rest of the things are of hardly interest for > libmagic identification... Again, this is not the point. The point is whether I can safely read the first bytes and put them back into t

Re: File upload: how to validate file type

2009-03-28 Thread P M
yes you can, because signature of pdf is in the starting of 1st chunk of stream... rest of the things are of hardly interest for libmagic identification... what ever method you are using to handle the chunks/streams is still the same, regardless of type of data user is uploading, one more tip

Re: File upload: how to validate file type

2009-03-28 Thread Torsten Bronger
Hallöchen! P M writes: > there are various ways to check, but best will be to use > Python-libmagic interface... it did worked well for me .. Thank for the hint, however, the interesting part is whether I can safely tamper with the file object in the clean method, so that the actual download wi

Re: File upload: how to validate file type

2009-03-28 Thread P M
servus, there are various ways to check, but best will be to use Python-libmagic interface... it did worked well for me .. mit freundliche Grüß On Sat, Mar 28, 2009 at 10:16 PM, Torsten Bronger < bron...@physik.rwth-aachen.de> wrote: > > Hallöchen! > > I'd like to ensure that people only upload

Re: File upload failing occasionally

2009-01-06 Thread Graham Dumpleton
On Jan 6, 10:31 pm, ppdo wrote: > To Karen: yes, I meant TCP RST, sorry. > > Update: > > Using mod_wsgi made the problem go away for Firefox. > > Limiting my research to an interaction problem between Apache and > Safari, I stumbled upon this bug report for Apache > https://bugs.webkit.org/show

Re: File upload failing occasionally

2009-01-06 Thread ppdo
To Karen: yes, I meant TCP RST, sorry. Update: Using mod_wsgi made the problem go away for Firefox. Limiting my research to an interaction problem between Apache and Safari, I stumbled upon this bug report for Apache https://bugs.webkit.org/show_bug.cgi?id=5760 that describes something very sim

Re: File upload failing occasionally

2009-01-05 Thread Karen Tracey
On Mon, Jan 5, 2009 at 5:30 PM, ppdo wrote: > > I tried to monitor the interface using WireShark and the communication > just hangs during a data transfer: Apache is just acknowledging the > receipt of some packets and then just seems to hang. The suspicious > bit is a fairly long series of http

Re: File upload failing occasionally

2009-01-05 Thread Graham Dumpleton
On Jan 6, 9:30 am, ppdo wrote: > I tried to monitor the interface using WireShark and the communication > just hangs during a data transfer: Apache is just acknowledging the > receipt of some packets and then just seems to hang. The suspicious > bit is a fairly long series of http RST about 20m

Re: File upload failing occasionally

2009-01-05 Thread ppdo
I tried to monitor the interface using WireShark and the communication just hangs during a data transfer: Apache is just acknowledging the receipt of some packets and then just seems to hang. The suspicious bit is a fairly long series of http RST about 20ms before the server hangs. Though I'm not

Re: File upload failing occasionally

2009-01-05 Thread Graham Dumpleton
On Jan 5, 8:33 pm, ppdo wrote: > The failure does not depend on the file size: I manage to upload files > bigger than 60 MB and fail on 30 kB files. > > I tried with Safari and Firefox and I got the same results, though I > got the *impression* (but given the randomness of the problem I am not

Re: File upload failing occasionally

2009-01-05 Thread ppdo
The failure does not depend on the file size: I manage to upload files bigger than 60 MB and fail on 30 kB files. I tried with Safari and Firefox and I got the same results, though I got the *impression* (but given the randomness of the problem I am not sure this is a real observation) that it fa

Re: File upload failing occasionally

2009-01-05 Thread Graham Dumpleton
Sorry, some more questions. How big are the files you are trying to upload? What browser/client are you using to do the uploads? What do you have Timeout directive set to in Apache configuration? Graham On Jan 5, 6:24 pm, ppdo wrote: > Hi, > > Thanks for looking into this. I used embedded mo

Re: File upload failing occasionally

2009-01-04 Thread ppdo
Hi, Thanks for looking into this. I used embedded mode and the error is the following (different message, but same place in multipartparser.py): IOError at /myapp/upload/2009-01-03/1 request data read error Request Method: POST Request URL:http://127.0.0.1/myapp/upload/2009-01-03/1 Exception

Re: File upload failing occasionally

2009-01-04 Thread Graham Dumpleton
On Jan 5, 10:24 am, ppdo wrote: > Hi all, > > I am trying to port my first Django 1.0.2 application to run on OSX/ > Leopard with Apache + mod_python 3.3.1 + python 2.6.1 (all running in > 64-bit mode) and I am experiencing an occasional error when uploading > a file that was not present when t

Re: File upload problem

2008-10-29 Thread Benedict Verheyen
Roodie wrote: > Hello, > > I have an interesting problem. One of the users of my ( test ) django > site reported that he cannot upload image banners to the site using > the custom admin. I've checked the logs, and found the following > exception logged: > > Traceback (most recent call last): >

Re: File upload progress bar for Django?

2008-10-22 Thread Ian Lawrence
Hi very cool..thx for putting this together. You have saved me some time! Ian -- http://ianlawrence.info --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: File upload progress bar for Django?

2008-10-22 Thread john
On Oct 20, 2008, at 12:22 PM, M Godshall wrote: > Is anyone familiar with a django or python tutorial that shows how > to implement > some kind of file upload progress bar? Ideally I'd like to use > jquery, but I'm open to anything at this point. Any links or code > examples would be greatly

Re: File upload progress bar for Django?

2008-10-21 Thread john
On Oct 20, 2008, at 12:22 PM, M Godshall wrote: > Is anyone familiar with a django or python tutorial that shows how > to implement > some kind of file upload progress bar? Ideally I'd like to use > jquery, but I'm open to anything at this point. Any links or code > examples would be greatly

Re: File upload progress bar for Django?

2008-10-21 Thread john Moylan
There are working examples around. Basically get your server to report the upload status to a javascript ui at intervals. Try searching the djangoproject trac server - there is a link from there to a django uploader project on google code that I have used in the past. I think it uses JQuery. I'd s

Re: File upload progress bar for Django?

2008-10-21 Thread jonknee
On Oct 20, 7:15 pm, Sascha Brossmann <[EMAIL PROTECTED]> wrote: > > Is anyone > > familiar with a django or python tutorial that shows how to implement > > some kind of file upload progress bar? > > Sorry, but the main magic in those uploaders is done via flash, not > via js or php. AFAIK there is

Re: File upload progress bar for Django?

2008-10-21 Thread varikin
On Oct 20, 6:15 pm, Sascha Brossmann <[EMAIL PROTECTED]> wrote: > > Is anyone > > familiar with a django or python tutorial that shows how to implement > > some kind of file upload progress bar? > > Sorry, but the main magic in those uploaders is done via flash, not > via js or php. AFAIK there

Re: File upload progress bar for Django?

2008-10-20 Thread Sascha Brossmann
> Is anyone > familiar with a django or python tutorial that shows how to implement > some kind of file upload progress bar? Sorry, but the main magic in those uploaders is done via flash, not via js or php. AFAIK there is currently no sane (though you may use Java ;-)) way to do it otherwise. --

  1   2   >