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

Avoid magic in DjangoGetter for FieldFile #1410

Open
jakajancar opened this issue Feb 16, 2025 · 0 comments
Open

Avoid magic in DjangoGetter for FieldFile #1410

jakajancar opened this issue Feb 16, 2025 · 0 comments

Comments

@jakajancar
Copy link

I would like to create a custom schema for FieldFile that returns something like

{
    name: "...",
    url: "...",            // content-disposition: inline
    download_url: "...",   // content-disposition: attachment
    content_type: "...",   // guessed based on extension
}

Would expect it to not be a problem, just define a schema for the FileField property, however DjangoGetter automatically converts the result to result.url meaning you lose the original FieldFile and are now stuck with only the url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant