Skip to content

Commit

Permalink
feat(@tinacms/media): cms.media has all of the MediaStore methods
Browse files Browse the repository at this point in the history
closes #1458
  • Loading branch information
ncphillips committed Sep 10, 2020
1 parent 4464474 commit 97b080b
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/@tinacms/media/src/media.ts
Expand Up @@ -79,6 +79,18 @@ export interface MediaStore {
* })
* ```
*/
export class MediaManager {
export class MediaManager implements MediaStore {
constructor(public store: MediaStore) {}

get accept() {
return this.store.accept
}

persist(files: MediaUploadOptions[]): Promise<Media[]> {
return this.store.persist(files)
}

previewSrc(src: string): Promise<string> {
return this.store.previewSrc(src)
}
}

0 comments on commit 97b080b

Please sign in to comment.