Skip to content

Commit

Permalink
feat(@tinacms/media): MediaStore's can have an optional previewSrc me…
Browse files Browse the repository at this point in the history
…thod
  • Loading branch information
ncphillips committed Aug 13, 2020
1 parent e4066d5 commit e4024d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/@tinacms/media/src/media.ts
Expand Up @@ -57,6 +57,12 @@ export interface MediaStore {
* for those files.
*/
persist(files: MediaUploadOptions[]): Promise<Media[]>

/**
* Given a `src` string it returns a url for previewing that content.
* This is helpful in cases where the file may not be available in production yet.
*/
previewSrc?(src: string): Promise<string>
}

/**
Expand Down

0 comments on commit e4024d2

Please sign in to comment.