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

Uploading of front/rear images for device types fails #84

Open
jbemmel opened this issue Mar 17, 2023 · 4 comments
Open

Uploading of front/rear images for device types fails #84

jbemmel opened this issue Mar 17, 2023 · 4 comments
Labels
status: revisions needed This issue requires additional information to be actionable

Comments

@jbemmel
Copy link
Contributor

jbemmel commented Mar 17, 2023

The front_image and rear_image attributes require special handling for uploading images into Django.
Since the script doesn't use multipart/form data, the import of any device type that specifies these attributes fails with

{"front_image":["The submitted data was not a file. Check the encoding type on the form."],"rear_image":["The submitted data was not a file. Check the encoding type on the form."]}
@danner26
Copy link
Member

Hello @jbemmel, as mentioned in the PR, v2.0.0 was released today. Thus, you will need to reevaluate how your PR is written and what files have been modified. I would be glad to assist if needed.

@danner26 danner26 added the status: revisions needed This issue requires additional information to be actionable label Mar 24, 2023
@danner26
Copy link
Member

Please also refer to this PR in the devicetype-library as well as this issue thread.

In the coming days I will also be working on a new release for this script to accommodate these changes. Feel free to pitch in if you would like

@jbemmel
Copy link
Contributor Author

jbemmel commented Mar 25, 2023

Working on a draft here: https://github.com/jbemmel/Device-Type-Library-Import/tree/fix_image_upload_v2

Need to move the images to the new location, will update after you push that

@danner26
Copy link
Member

Awesome, once the PR is fixed I'll merge the images for you

NicJames2378 pushed a commit to NicJames2378/Device-Type-Library-Import that referenced this issue Jul 11, 2024
NicJames2378 added a commit to NicJames2378/Device-Type-Library-Import that referenced this issue Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: revisions needed This issue requires additional information to be actionable
Projects
None yet
Development

No branches or pull requests

2 participants