mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Add direct link to photo #683
This commit is contained in:
parent
f3231d5ab2
commit
6f1c42f3d4
@ -8,6 +8,7 @@ import {ProjectPath} from '../../ProjectPath';
|
||||
import * as path from 'path';
|
||||
import {PhotoMetadata} from '../../../common/entities/PhotoDTO';
|
||||
import {Utils} from '../../../common/Utils';
|
||||
import {QueryParams} from '../../../common/QueryParams';
|
||||
|
||||
export class EmailMediaMessenger {
|
||||
transporter: Transporter;
|
||||
@ -58,7 +59,8 @@ export class EmailMediaMessenger {
|
||||
let htmlMiddle = '';
|
||||
for (let i = 0; i < media.length; ++i) {
|
||||
const thPath = await this.getThumbnail(media[i]);
|
||||
const linkUrl = Utils.concatUrls(Config.Server.publicUrl, '/gallery/',encodeURIComponent(path.join(media[i].directory.path, media[i].directory.name)));
|
||||
const linkUrl = Utils.concatUrls(Config.Server.publicUrl, '/gallery/', encodeURIComponent(path.join(media[i].directory.path, media[i].directory.name))) +
|
||||
'?' + QueryParams.gallery.photo + '=' + encodeURIComponent(media[i].name);
|
||||
const location = (media[i].metadata as PhotoMetadata).positionData?.country ?
|
||||
(media[i].metadata as PhotoMetadata).positionData?.country :
|
||||
((media[i].metadata as PhotoMetadata).positionData?.city ?
|
||||
|
Loading…
Reference in New Issue
Block a user