Re: I need some clarifications about managing Files in FIle storage

2022-11-01 Thread 'Kasper Laudrup' via Django users
On 01/11/2022 05.29, MaheshKumar wrote: I want to know about the Managing files topic specifically in file storage. https://docs.djangoproject.com/en/4.1/ref/files/storage/ Kind regards, Kasper Laudrup -- You received this message because you are subscribed to the Google Groups "D

I need some clarifications about managing Files in FIle storage

2022-11-01 Thread MaheshKumar
I want to know about the Managing files topic specifically in file storage. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-user

Re: File Storage API: save file to DB model and disk: separate disk path from file name

2014-10-17 Thread Jon Dufresne
On Fri, Oct 17, 2014 at 4:45 PM, Russell Keith-Magee wrote: > Achievable? probably. Easy? No. You're going to be digging in the weeds on > this one. > > If I were trying to do this, I wouldn't try and get this to work with the > existing FileField - I'd be writing my own Field definition. You can

Re: File Storage API: save file to DB model and disk: separate disk path from file name

2014-10-17 Thread Russell Keith-Magee
On Sat, Oct 18, 2014 at 3:32 AM, Jon Dufresne wrote: > Hi, > > I'm trying to use the File Storage API to create a custom handler for > files. Here are my goals: > > Stored files are represented both in the database and on disk with the > following model: > &g

File Storage API: save file to DB model and disk: separate disk path from file name

2014-10-17 Thread Jon Dufresne
Hi, I'm trying to use the File Storage API to create a custom handler for files. Here are my goals: Stored files are represented both in the database and on disk with the following model: class StoredFile(models.Model): name = models.CharField(max_length=255) path = models.Char

Re: Handling temporary file storage with WizardView

2014-08-22 Thread zubair alam
, September 13, 2013 8:44:13 AM UTC+1, dspruell wrote: > > I'm working on a WizardView (django.contrib.formtools) and have a step > that handles a file upload, so I'm setting the file_storage attribute > as required. I'd like the file storage to be a securely created > tem

Inconsistency in model field with file storage on Amazon S3

2013-10-04 Thread Vivek Prakash
Hi all, I am running a fairly good scale production system in Django, where we receive requests in order of 100 to 1000 per second. We are using s3boto backend for file storage. All the files are saved in a single bucket on S3. When the request for number of files to be saved increases

Inconsistency in model field with file storage on Amazon S3

2013-10-04 Thread Vivek Prakash
Hi all, I am running a fairly good scale production system in Django, where we receive requests in order of 100 to 1000 per second. We are using s3boto backend for file storage. All the files are saved in a single bucket on S3. When the request for number of files to be saved increases, database

Handling temporary file storage with WizardView

2013-09-13 Thread Darren Spruell
I'm working on a WizardView (django.contrib.formtools) and have a step that handles a file upload, so I'm setting the file_storage attribute as required. I'd like the file storage to be a securely created temporary directory under /tmp so I'm trying to set it to an instance of

File Storage help

2012-10-19 Thread Christopher Meng
Hi all, I want to know who has an example for file sharing service written in Django... Recently I have to write a file sharing project for students sharing their files in order to improve the usability and experience... So can anyone help me? -- You received this message because you are su

Re: Split File Storage

2011-12-27 Thread Brian Schott
I am running out of affordable upgrade options and > need to scale the file storage out to multiple machines once it hits 3TB. I > have a pretty good idea about what needs to be done for this but I wanted to > ask here first incase someone has a snippet / custom storage already written

Split File Storage

2011-12-27 Thread Cameron
Greetings all- I have a django site which is referencing about 1TB of static files at the moment and growing fast. I am running out of affordable upgrade options and need to scale the file storage out to multiple machines once it hits 3TB. I have a pretty good idea about what needs to be done

Re: How to scale out uploaded file storage & serving?

2010-12-26 Thread Russ B.
If it's just disk performance and ability to add on space, a simple performance RAID (JBOD or RAID-0) attached internally, externally via Firewire/eSATA, or as NAS from another machine. If you're worried about a lot of files moving down the network concurrently, then you'll certainly have to look i

Re: How to scale out uploaded file storage & serving?

2010-12-26 Thread Javier Guerra Giraldez
On Sun, Dec 26, 2010 at 1:40 AM, Andy wrote: > Planning ahead, if the website gets popular, how do I scale it out so > that the images (both original and thumbnails) will be stored in and > served from multiple servers? Maybe a cluster? Is there any open > source software that would help me in thi

How to scale out uploaded file storage & serving?

2010-12-25 Thread Andy
I'm building a website where users can upload photos and I'd also convert uploaded photos into thumbnails (probably using sorl- thumbnail). When everything fits in one server, I would just use FileField() and handle_uploaded_file() as detailed in the doc. Planning ahead, if the website gets popul

File storage

2010-09-07 Thread Dave
Hello, I am doing a project in djagno and I stucked in working with files. I am realy confused about, how it is described in django documentation and I did not find a solution in it that would suit my case. So basically what I want to do - I want to have a storage for some certain files in my proj

Django File Storage Issue

2010-03-06 Thread jechu
Hello, I'm curious as to how to correctly store user uploaded files to a database in Django. I was able to do this once in my django code, but I replicated this in another section and it doesn't work. Basically, I have added a new field in my model: img = models.ImageField(upload_to='folder/'). W

Re: File storage: Filesystem vs Database

2009-09-22 Thread Tom Evans
On Tue, 2009-09-22 at 08:12 -0700, Charles Wang wrote: > I have a question for "make apache deliver it". How to control the > access right? Integrate apache access auth model with Django? > > On Sep 22, 10:37 pm, Javier Guerra wrote: > > On Tue, Sep 22, 2009 at 8:09 AM, Jonas Obrist wrote: > >

Re: File storage: Filesystem vs Database

2009-09-22 Thread Javier Guerra
On Tue, Sep 22, 2009 at 10:12 AM, Charles Wang wrote: > I have a question for "make apache deliver it". How to control the > access right? Integrate apache access auth model with Django? not exactly, the idea is that the file isn't under apache's DocumentRoot, so it won't have it's own URL. ins

Re: File storage: Filesystem vs Database

2009-09-22 Thread Jonas Obrist
Thanks to both Javiers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-u

Re: File storage: Filesystem vs Database

2009-09-22 Thread Javier Rivera
Charles Wang escribiu: > I have a question for "make apache deliver it". How to control the > access right? Integrate apache access auth model with Django? X-Send-File could send any file that apache can access not only files on the "www path". It can send a file that is not accessible by url as

Re: File storage: Filesystem vs Database

2009-09-22 Thread Charles Wang
I have a question for "make apache deliver it". How to control the access right? Integrate apache access auth model with Django? On Sep 22, 10:37 pm, Javier Guerra wrote: > On Tue, Sep 22, 2009 at 8:09 AM, Jonas Obrist wrote: > > I wanna store files (attachments to forum posts) outside the MEDI

Re: File storage: Filesystem vs Database

2009-09-22 Thread Javier Guerra
On Tue, Sep 22, 2009 at 8:09 AM, Jonas Obrist wrote: > I wanna store files (attachments to forum posts) outside the MEDIA_ROOT > to restrict file downloads to registered users. So I'd have to server > them through django instead of apache. What would be the better way to > do this: Store them in

File storage: Filesystem vs Database

2009-09-22 Thread Jonas Obrist
Hi django-users I wanna store files (attachments to forum posts) outside the MEDIA_ROOT to restrict file downloads to registered users. So I'd have to server them through django instead of apache. What would be the better way to do this: Store them in a the database or store them in the filesy

File Storage Suggestions

2009-09-08 Thread brad
I currently have a django site running on a single machine (web server + database + file storage). This site contains many multimedia files (audio, video, documents) that are uploaded and retrieved by end- users. We've reached the point where we need to push the multimedia storage off of

Mosso file storage backend

2009-02-23 Thread sleepyjames
Has anyone already written a storage backend for Mosso's cloud files, cos I can't find one. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goog

Re: S3 tutorial for File Storage Refactor?

2008-09-04 Thread David Larlet
Hi Jay, Thanks for the patch, I need to spend more time on this but I had pushed your correction. Any feedback is really appreciated. Best, David Le 2 sept. 08 à 18:22, shadfc a écrit : > To fix the corrupt images error, add > content.open() > to the top of _save() on the S3Storage class (or

Re: S3 tutorial for File Storage Refactor?

2008-09-02 Thread shadfc
To fix the corrupt images error, add content.open() to the top of _save() on the S3Storage class (or at least before the chunks() or read() calls). This basically causes a seek(0) on content. I think perhaps some of the image validation reads part of the file and doesn't reset the pointer back t

Re: S3 tutorial for File Storage Refactor?

2008-09-01 Thread Ramdas S
David, I think this is still not fixed. I am getting the same errors R On Aug 25, 2:02 pm, David Larlet <[EMAIL PROTECTED]> wrote: > Le 20 août 08 à 17:56, shadfc a écrit : > > > > > > > With the code from the django-storages you referenced installed > > somewhere on PYTHONPATH, its as easy as

Re: using File storage

2008-08-28 Thread julianb
On Aug 28, 8:53 pm, julianb <[EMAIL PROTECTED]> wrote: > I tried several things, I think Marty's solution was among them. It > did not throw errors, but the file I got was 0 bytes. I will try again > and check if I made a mistake or so... Okay, I solved the puzzle. The following works: big = Str

Re: using File storage

2008-08-28 Thread julianb
On Aug 28, 8:44 pm, "Tim Kersten" <[EMAIL PROTECTED]> wrote: > This should fix the error you got: > > import StringIO > from django.core.files import File > f = StringIO.StringIO() > f.name, f.mode = 'data.xml', 'r' > f.write(data) > myfile = File(f) > Chart.objects.create(xml=default_storage.save

Re: using File storage

2008-08-28 Thread Tim Kersten
Oh, I should have seen that coming. (That's the bad thing when you write code without testing it yourself... something is often missed :-) This should fix the error you got: import StringIO from django.core.files import File f = StringIO.StringIO() f.name, f.mode = 'data.xml', 'r' f.write(data)

Re: using File storage

2008-08-28 Thread julianb
On Aug 28, 6:03 pm, "Tim Kersten" <[EMAIL PROTECTED]> wrote: > There's probably a better way than this though so you might want to > wait for other replies. > > import StringIO > from django.core.files import File > f = StringIO.StringIO() > f.write(data) > myfile = File(f) > Chart.objects.create(

Re: using File storage

2008-08-28 Thread Tim Kersten
> Chart.objects.create(xml=default_storage.save('data.xml', ContentFile(data))) ha, I was almost certain that django wouldn't make it as hard as I had explained it. :-D Glad to see it's this easy! Tim ^,^ --~--~-~--~~~---~--~~ You received this message because yo

Re: using File storage

2008-08-28 Thread Marty Alchin
On Thu, Aug 28, 2008 at 11:44 AM, Jiri Barton <[EMAIL PROTECTED]> wrote: > I would like Django to take care of the file naming for me. I would > like to use a one-liner such as > > Chart.objects.create(xml=default_storage.save('data.xml', data)) You're nearly there for getting this to work, it's

Re: using File storage

2008-08-28 Thread Tim Kersten
rote: > > What is the preferred way of storing generated content into file > models? > > class Chart(models.Model): >xml = models.FileField(upload_to='charts') >... > > I would like compute the image on the fly, using some data in the > database. How shoul

using File storage

2008-08-28 Thread Jiri Barton
What is the preferred way of storing generated content into file models? class Chart(models.Model): xml = models.FileField(upload_to='charts') ... I would like compute the image on the fly, using some data in the database. How should I store the generated data? How should

Re: S3 tutorial for File Storage Refactor?

2008-08-25 Thread David Larlet
Le 20 août 08 à 17:56, shadfc a écrit : > > With the code from the django-storages you referenced installed > somewhere on PYTHONPATH, its as easy as setting a few things in your > settings.py. You can see the docs for the code at > http://code.larlet.fr/doc/django-s3-storage.html. Put the Req

Re: S3 tutorial for File Storage Refactor?

2008-08-20 Thread shadfc
I don't think its as simple as that. As I said, "no software I have will recognize them as valid images". This includes GIMP, Eye of Gnome, etc. All say that it is not a valid image or is corrupted. Jay On Aug 20, 12:41 pm, Martin Diers <[EMAIL PROTECTED]> wrote: > I would suspect that  #2 is

Re: S3 tutorial for File Storage Refactor?

2008-08-20 Thread Martin Diers
I would suspect that #2 is a mime-type problem, which is just an S3 property. Presuming the ImageField translates to a basic href into S3, the mime-type property of the file would need to be set or else it is going to come across as a Binary file. Some browsers are ok with this non-standa

Re: S3 tutorial for File Storage Refactor?

2008-08-20 Thread shadfc
With the code from the django-storages you referenced installed somewhere on PYTHONPATH, its as easy as setting a few things in your settings.py. You can see the docs for the code at http://code.larlet.fr/doc/django-s3-storage.html. Put the Required and Optional (if you want it, obviously) stuff