Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }