mirror of
https://github.com/ShareX/ShareX.git
synced 2024-07-02 21:20:28 +12:00
fixed #408: If host not includes http(s):// then add it automatically
This commit is contained in:
parent
0ab449a4f9
commit
40868f8ad8
|
@ -120,6 +120,7 @@ public string ShareFile(string path)
|
|||
args.Add("permissions", "1"); // 1 = read; 2 = update; 4 = create; 8 = delete; 16 = share; 31 = all (default: 31, for public shares: 1)
|
||||
|
||||
string url = URLHelpers.CombineURL(Host, "ocs/v1.php/apps/files_sharing/api/v1/shares?format=json");
|
||||
url = URLHelpers.FixPrefix(url);
|
||||
NameValueCollection headers = CreateAuthenticationHeader(Username, Password);
|
||||
string response = SendRequest(HttpMethod.POST, url, args, headers);
|
||||
|
||||
|
|
Loading…
Reference in a new issue