mirror of
https://github.com/ShareX/ShareX.git
synced 2024-10-01 09:47:22 +13:00
Don't generate direct download links when PreviewLink is checked
See issue: https://github.com/ShareX/ShareX/issues/3868 Not adding either /preview or /download to URL generates links that show a preview of a file. /preview only works for images (showing literally only the image in the browser). This change makes sure the logic is right. Note: The logic is right so it should work. But I'm not sure if the syntax is right.
This commit is contained in:
parent
407c644f1f
commit
087b6118fc
1 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ public string ShareFile(string path)
|
|||
string link = data.url;
|
||||
if (PreviewLink)
|
||||
{
|
||||
link += Helpers.IsImageFile(path) ? "/preview" : "/download";
|
||||
link += Helpers.IsImageFile(path) ? "/preview" : (IsCompatibility81 ? "/" : "&") + "download";
|
||||
}
|
||||
else if (DirectLink)
|
||||
{
|
||||
|
@ -226,4 +226,4 @@ public class OwnCloudShareResponseData
|
|||
public string token { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue