Replies: 1 comment
-
@kaoplx A Base64FileField expects f to be a string, not a bytes-like object. Try this:
Also, this is probably best raised in https://github.com/jasonyates/netbox-documents, rather than here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want upload txt for site.
f = open('file.txt', 'rb'). read() f = base64.b64encode(f) nb.plagins.documents.site_documents.create(site='11', name='doc', document_type='other', document= f)
Take error - object of type bytes is not JSON serializable.
If
f = open('file.txt', 'rb'). read()
Error - object has no attribute "JSON"
Beta Was this translation helpful? Give feedback.
All reactions