On Fri, Apr 4, 2008 at 1:04 PM, Mike Axiak <
mcaxiak@...> wrote:
> Composition gets a little tricky. I realized this when I wrote the
> stuff that handles the composition.
> Right now we have (InMemoryUploadHandler, TemporaryFileUploadHandler)
> in a sequence, and now the memory handler doesn't have to worry about
> what happens nor does the TemporaryFileUploadHandler need to worry
> about what's before.
> Basically every upload handler I can think of writing benefits from
> this. For example, the UploadProgressUploadHandler would be wedged
> between:
>
> (InMemoryUploadHandler, UploadProgressUploadHandler,
> TemporaryFileUploadHandler)
>
> So that file progress only gets computed for uploads that go into the
> file system. Avoiding the overhead for small uploads.
OK, I think I understand; thanks. It's hard sometimes figuring out a
thought process from its final result. I think you're probably right
to make this a list, then.
> This [FILE_UPLOAD_HANDLERS] took a while for me to get sold on. I can
> only think of 5 or 6 useful upload handlers, but that's still 1956
> possible orderings. It'd be tough to make a handler easy to install
> when it has to be aware of where it belongs. This functionality could
> be replicated in a middleware which reads the settings, but I'm not
> sure that's the best place for something like that.
Hrm, good point. I'll chew a bit more, but I can't think of a good way
to avoid the extra setting (as much as I dislike creeping settings).
Jacob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to
django-developers@...
To unsubscribe from this group, send email to
django-developers-unsubscribe@...
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en-~----------~----~----~----~------~----~------~--~---