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

File upload works as documented, but SPA's also can upload file's via JSON in body #151

Closed
acidjunk opened this issue Dec 11, 2019 · 1 comment

Comments

@acidjunk
Copy link

Would it be possible to support this other way of file upload?

I now handle it with this code in my view:

data = request.get_json()
image_mime, image_base64 = data["image_1"]["src"].split(",")
image = base64.b64decode(image_base64)

Swagger specs are not in sync how this endpoint should be used.

I ran into this by using React-Admin file upload which support Drag and drop fileupload:
https://marmelab.com/react-admin/DataProviders.html#decorating-your-data-provider-example-of-file-upload

@acidjunk
Copy link
Author

sorry wrong repo :(

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