Open Regaez opened 5 years ago
Currently, there is no way to upload media such as images/pdfs etc to a page. The /pages
endpoint does not allow this. A separate resource could be useful to separate the media from the page's header/content data. Perhaps an endpoint such as:
POST /api/media
, orPOST /api/images
, orPOST /api/data
It could be great if a user could create/edit media metafiles via this endpoint, too. See Grav docs for more info regarding metafiles: https://learn.getgrav.org/16/content/media#metafiles
I think /api/media
would probably be better, as there are a variety of media types supported by Grav -- an endpoint of /api/images
would not accurately reflect that.
How should the API manage site media? Should there be another endpoint that will allow uploading/deleting images etc?
Need to investigate how Grav internally handles media.