next-drupal
next-drupal copied to clipboard
Get getResourceByPath for Drupal Media
I am trying to display a normal NextJS page to display single Drupal Media under path /media/[mid].tsx.
I am trying to get the entity using const entity = await getResourceByPath(/media/${mid}); but I always get a 404 error.
The issue is solved only if I enable the option [x] Allow users to access media items at /media/{id} under Media Settings on the Drupal CMS (/admin/config/media/media-settings).
If the above is true we need to update the Documentation accordingly.
I see. I think we could document the permissions required for the entity types shipped in core.