allow image/gif
This commit is contained in:
parent
1f8e4873a1
commit
ac64d93635
3 changed files with 2 additions and 2 deletions
|
|
@ -41,7 +41,7 @@ let f request =
|
|||
<input name="tags" type="text" class="form-control" id="tags" aria-labelledby="tags-label" />
|
||||
<br />
|
||||
<label for="file" id="file-label" class="form-label">Picture:</label>
|
||||
<input id="file" name="file" aria-describedby="file-label" type="file" accept="image/png,image/jpeg,image/webp">
|
||||
<input id="file" name="file" aria-describedby="file-label" type="file" accept="image/png,image/jpeg,image/webp,image/gif">
|
||||
<br />
|
||||
<label for="alt" id="alt-label" class="form-label">Image description:</label>
|
||||
<input name="alt" type="text" class="form-control" id="alt" aria-labelledby="alt-label" />
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ let make_image image =
|
|||
| None -> Error "invalid image type"
|
||||
| Some mime -> (
|
||||
match mime with
|
||||
| "image/jpeg" | "image/png" | "image/webp" -> (
|
||||
| "image/jpeg" | "image/png" | "image/webp" | "image/gif" -> (
|
||||
match make_thumbnail content with
|
||||
| Error e -> Error e
|
||||
| Ok thumbnail -> Ok { name; alt; content; thumbnail } )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue