backend: link to /media/:media_id instead of raw image
This commit is contained in:
parent
84cbc5dd30
commit
171c6ee8cd
@ -23,6 +23,7 @@ sub list ($self)
|
||||
|
||||
$self->title("Pooru~");
|
||||
my @media = map +{
|
||||
media_link => $self->url_for("media_show", media_id => $_->{media_id}),
|
||||
media_src => $self->seaweed->url_for(
|
||||
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
||||
),
|
||||
|
@ -50,6 +50,7 @@ sub show ($self)
|
||||
|
||||
$self->title($res->json->{name});
|
||||
my @media = map +{
|
||||
media_link => $self->url_for("media_show", media_id => $_->{media_id}),
|
||||
media_src => $self->seaweed->url_for(
|
||||
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
||||
),
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<div class="flex-c-horizontal flex-c-wrap gallery">
|
||||
% for my $m (@$media) {
|
||||
<%= link_to $m->{media_src} => begin %>
|
||||
<%= link_to $m->{media_link} => begin %>
|
||||
<%= image $m->{media_src} %>
|
||||
<% end %>
|
||||
% }
|
||||
|
Loading…
Reference in New Issue
Block a user