Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom filename to be provided to URLFile #2004

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Commits on Oct 18, 2024

  1. Support custom filename to be provided to URLFile

    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 committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    ec9ca7c View commit details
    Browse the repository at this point in the history