Merge pull request #1448 from OliverEvans96/gif_cache
Remove cache-busting from gif animation. Should be done by the frontend.
This commit is contained in:
commit
7b3826c2d5
@ -93,13 +93,13 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# write out html to view the gif... note the rand call which is a hack so the image doesn't get cached
|
# write out html to view the gif
|
||||||
function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif)
|
function Base.show(io::IO, ::MIME"text/html", agif::AnimatedGif)
|
||||||
ext = file_extension(agif.filename)
|
ext = file_extension(agif.filename)
|
||||||
write(io, if ext == "gif"
|
write(io, if ext == "gif"
|
||||||
"<img src=\"$(relpath(agif.filename))?$(rand())>\" />"
|
"<img src=\"$(relpath(agif.filename))\" />"
|
||||||
elseif ext in ("mov", "mp4")
|
elseif ext in ("mov", "mp4")
|
||||||
"<video controls><source src=\"$(relpath(agif.filename))?$(rand())>\" type=\"video/$ext\"></video>"
|
"<video controls><source src=\"$(relpath(agif.filename)) type=\"video/$ext\"></video>"
|
||||||
else
|
else
|
||||||
error("Cannot show animation with extension $ext: $agif")
|
error("Cannot show animation with extension $ext: $agif")
|
||||||
end)
|
end)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user