cog icon indicating copy to clipboard operation
cog copied to clipboard

Support custom filename to be provided to URLFile

Open aron opened this issue 1 year ago • 0 comments

This commit works around an issue where the basename of the URL many not actually contain a file extension and the uploader logic cannot infer the mime type for the file.

We stash the name when pickling and extract it again when unpickling. The getattr function then supports returning the underlying name value rather than proxying to the underlying request object.

I also ran into a small bug whereby the del method was triggering a network request because of some private attributes being accessed during teardown would trigger the wrapper code. I've overridden the super class to disable this. Though I'm unclear if this is just the test suite doing this cleanup.

aron avatar Oct 18 '24 15:10 aron