(uri: string, head: HeadInfo)
| 142 | } |
| 143 | |
| 144 | function createPreviewImage(uri: string, head: HeadInfo): PreviewImage { |
| 145 | return { |
| 146 | url: uri, |
| 147 | contentType: "image", |
| 148 | mimeType: head.contentType, |
| 149 | size: head.contentLength, |
| 150 | }; |
| 151 | } |
| 152 | |
| 153 | // Rewrites the URL to convert an ipfs: url to use https://ipfs.io/ipfs/ |
| 154 | // Rewrites the URL to convert an git: url to use https:// |