예제 #1
0
        public string UploadToNamedStorage(Stream content, string fileName, string storageIdentifier)
        {
            var request = new UploadMessage(CreateEphorteIdentity(), fileName, storageIdentifier, content);

            using (var documentsService = CreateServiceClient())
            {
                var response = documentsService.UploadFile(request);
                return(response.FileName);
            }
        }
예제 #2
0
        public async Task <string> UploadToTemporaryStorageAsync(Stream content, string fileName)
        {
            var request = new UploadMessage(CreateEphorteIdentity(), fileName, null, content);

            using (var documentsService = CreateServiceClient())
            {
                var response = await documentsService.UploadFileAsync(request);

                return(response.Identifier);
            }
        }