Commit Graph
12 Commits
Author SHA1 Message Date
Tyler Gill f93f9dcc5a Add new utility class, OAuthHttpClient.
This class extends HttpClient and uses an OAuthHttpMessageHandler under the covers to automatically authenticate requests.
Additionally, it automatically respects the global HttpContextSettings for overall timeout, read/write timeout, and SSL certificate validation.
(BufferRequests isn't currently handled, as HttpClient doesn't seem to easily expose that flag, and as of .NET 4.5, seems to not buffer by default.)
2018-03-23 15:07:51 -06:00
Tyler Gill 407bead9f9 Change some fragment settings.
Default retry delay is now 1000ms, and fragment sizes must be at least the multiple size (320 KiB)
2018-03-23 15:04:23 -06:00
Tyler Gill 5bec41b665 Update both SharePoint and Office 365 group backends to support more human-discernable methods of specifying the backend destination.
For SharePoint, this means instead of giving the site ID as a parameter (and a relative path as the backup URL), the full URL to the folder in SharePoint (e.g., 'sharepoint://{tenant}.sharepoint.com/{PathToSite}/{DocumentBase}/{subfolder}') can be given, and the site ID will be looked up.
(This should match the existing SharePoint backend, including the convention of using '//' to indicate the document root, though I can't explicitly test that since the SharePoint sites I have access to require 2FA, which the old backend doesn't support.)
I've tested both explicit ID and site path methods of specifying the destination, and they appear to be working.
For Office 365 groups, it now supports looking up a group by its email address.
2018-03-22 15:20:17 -06:00
Tyler Gill 987cda7e1d When uploading large files, MS graph backends need to parse the response inside the try block for retries to work (since that is where errors are thrown) 2018-03-22 14:41:19 -06:00
Tyler Gill 258799266e SharePoint and Group drives appear to report quota info that is all zeros.
In that case, pretend that no quota info was reported instead of causing incorrect quota warnings and errors.
2018-03-22 14:40:37 -06:00
Tyler Gill 438c84f824 Ensure custom fragment sizes fit the recommended sizes (under 60 MiB and multiple of 320 KiB) 2018-03-21 11:32:41 -06:00
Tyler Gill 6c05da925e Explicitly request the 'replace' conflict resolution behavior when uploading large files. 2018-03-20 15:28:57 -06:00
Tyler Gill dbb28c5f62 Make sure DNS names reported by Microsoft Graph backends are unique. 2018-03-20 15:26:52 -06:00
Tyler Gill c57d7e75cd Add helpId parameter to UserInformationExceptions in MicrosoftGraphBackends. 2018-03-20 15:09:06 -06:00
Tyler Gill 94341a640d Implement DNSName method in MicrosoftGraphBackend base class. 2018-03-20 15:08:30 -06:00
Tyler Gill f4c6100873 Add Duplicati + version as the user agent in the MS Graph backends. 2018-03-20 15:07:46 -06:00
Tyler Gill a98c967f70 Add new backends for OneDrive+OneDrive for Business, SharePoint, and Microsoft Groups based on the Microsoft Graph API.
These backends are implemented via the common base class, MicrosoftGraphBackend, with only a few minor tweaks (different id parameters, protocol keys, descriptions, etc.)
All three backends support streaming, quota retrieval, and rename.
2018-03-20 14:18:49 -06:00