コード例 #1
0
        public override async Task UploadProfileAsync(IWebDav webdav)
        {
            string remotePath = $"{SyncService.REMOTE_FILE_FOLDER}/{FileName}";

            FileInfo file = new FileInfo(fullPath);

            if (file.Length <= maxFileSize)
            {
                Log.Write("PUSH file " + FileName);
                webdav.PutFile(remotePath, fullPath);
            }
            else
            {
                Log.Write("file is too large, skipped " + FileName);
            }

            SetMd5(GetMD5HashFromFile(fullPath));
            await webdav.PutTextAsync(SyncService.REMOTE_RECORD_FILE, this.ToJsonString(), 0, 0).ConfigureAwait(false);
        }
コード例 #2
0
ファイル: TextProfile.cs プロジェクト: Jeric-X/SyncClipboard
 public override async Task UploadProfileAsync(IWebDav webdav)
 {
     await webdav.PutTextAsync(SyncService.REMOTE_RECORD_FILE, this.ToJsonString(), 0, 0).ConfigureAwait(false);
 }