api icon indicating copy to clipboard operation
api copied to clipboard

Addition of filename recipes for mediaStore

Open josephdenne opened this issue 5 years ago • 0 comments

The structure of URLs and naming of images is important for SEO, so the current date and hash approach is a little limiting.

The ability to be able to store images for recall on this basis would be ideal: https://empireonline.com/movies/blade-runner-2049/posters/blade-runner-2049-poster.jpg for example

This necessitates recipes within the collection schema for individual mediaStore fields.

For example: /movies/{title}/posters/{title}-poster{format}

Where {title} = the name of another field in the document ("title", with the value of "Blade Runner 2049").

When you upload an image to API, you upload it separately from any document it may be included in. You POST to /media, not to a collection. As such we will need to post the specific field content of the document that the recipe references with the image (and if it's not filled in yet, alert the user that it is required).

josephdenne avatar Apr 15 '19 16:04 josephdenne