Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SanMurakami committed Dec 19, 2019
1 parent 9e98392 commit ede61f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/repositories/drive-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class DriveFileRepository extends Repository<DriveFile> {
public getPublicUrl(file: DriveFile, thumbnail = false): string | null {
let url = thumbnail ? (file.thumbnailUrl || file.webpublicUrl || null) : (file.webpublicUrl || file.url);
if (file.uri != null && file.userHost != null && config.mediaProxy != null) {
url = `${config.mediaProxy}/${thumbnail ? 'thumbnail' : ''}?url=${file.uri}`;
url = `${config.mediaProxy}/${thumbnail ? 'thumbnail' : ''}?url=${encodeURIComponent(file.uri)}`;
}
return url;
}
Expand Down

0 comments on commit ede61f2

Please sign in to comment.