You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
It would be interesting being able to have user document to show up as list of filenames in user API endpoint.
On the one hand, I had been looking into implementing it, and I managed to add a new user_documents API endpoint which works as expected.
On the other hand, I am struggling to map it to user endpoint so a list can be shown for users having documents associated with.
Any suggestions?
The text was updated successfully, but these errors were encountered:
You should be able to create a UserDocumentSerializer, then add to UserSerializer something like documents = UserDocumentSerializer(many=True, read_only=True) and add it to the UserSerializer's expandable fields as well.
Then you should see the list of ids of UserDocuments and if you use ?expand=documents you will have the full list of UserDocuments including filenames.
I have not tested it, so you might have to tweak a few things
r-xyz
added a commit
to r-xyz/NEMO
that referenced
this issue
Dec 9, 2024
just a note here that there is now also a way to serve those login-protected media files using NEMO's API (so files can be retrieved using API token authentication)
Hi,
It would be interesting being able to have user document to show up as list of filenames in user API endpoint.
On the one hand, I had been looking into implementing it, and I managed to add a new
user_documents
API endpoint which works as expected.On the other hand, I am struggling to map it to
user
endpoint so a list can be shown for users having documents associated with.Any suggestions?
The text was updated successfully, but these errors were encountered: