mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-02 06:46:22 +01:00
Use file id to get preview if available
This commit is contained in:
parent
ff091d495d
commit
c4b53983fa
1 changed files with 8 additions and 2 deletions
|
@ -29,8 +29,14 @@ String getFilePreviewUrlRelative(
|
|||
String mode,
|
||||
bool a,
|
||||
}) {
|
||||
String url;
|
||||
if (file.fileId != null) {
|
||||
url = "index.php/core/preview?fileId=${file.fileId}";
|
||||
} else {
|
||||
final filePath = Uri.encodeQueryComponent(file.strippedPath);
|
||||
var url = "index.php/core/preview.png?file=$filePath&x=$width&y=$height";
|
||||
url = "index.php/core/preview.png?file=$filePath";
|
||||
}
|
||||
url = "$url&x=$width&y=$height";
|
||||
if (mode != null) {
|
||||
url = "$url&mode=$mode";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue