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~");
|
$self->title("Pooru~");
|
||||||
my @media = map +{
|
my @media = map +{
|
||||||
|
media_link => $self->url_for("media_show", media_id => $_->{media_id}),
|
||||||
media_src => $self->seaweed->url_for(
|
media_src => $self->seaweed->url_for(
|
||||||
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
||||||
),
|
),
|
||||||
|
@ -50,6 +50,7 @@ sub show ($self)
|
|||||||
|
|
||||||
$self->title($res->json->{name});
|
$self->title($res->json->{name});
|
||||||
my @media = map +{
|
my @media = map +{
|
||||||
|
media_link => $self->url_for("media_show", media_id => $_->{media_id}),
|
||||||
media_src => $self->seaweed->url_for(
|
media_src => $self->seaweed->url_for(
|
||||||
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
||||||
),
|
),
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<div class="flex-c-horizontal flex-c-wrap gallery">
|
<div class="flex-c-horizontal flex-c-wrap gallery">
|
||||||
% for my $m (@$media) {
|
% for my $m (@$media) {
|
||||||
<%= link_to $m->{media_src} => begin %>
|
<%= link_to $m->{media_link} => begin %>
|
||||||
<%= image $m->{media_src} %>
|
<%= image $m->{media_src} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
% }
|
% }
|
||||||
|
Loading…
Reference in New Issue
Block a user