public async Task <HttpResponseMessage> Start(string fileName) { var destination = await ReadJsonObjectAsync <SynchronizationDestination>(); Log.Debug("Starting to synchronize a file '{0}' to {1}", fileName, destination.FileSystemUrl); var result = await SynchronizationTask.SynchronizeFileToAsync(fileName, destination); return(this.GetMessageWithObject(result, HttpStatusCode.OK)); }
public async Task <HttpResponseMessage> Start(string filename) { var canonicalFilename = FileHeader.Canonize(filename); var destination = await ReadJsonObjectAsync <SynchronizationDestination>(); Log.Debug("Starting to synchronize a file '{0}' to {1}", canonicalFilename, destination.Url); var result = await SynchronizationTask.SynchronizeFileToAsync(canonicalFilename, destination); return(GetMessageWithObject(result)); }