Exemplo n.º 1
0
        public static bool CallStorageService(string path, byte[] fileData, string fileName)
        {
            var fileEntity = new fileEntity
            {
                path     = path.Replace("/", "|").Replace(@"\", "|"),
                fileData = fileData,
                fileName = fileName
            };
            var storage = new StorageServiceClient("StorageServiceImplPort");

            return(storage.AddFileObj(fileEntity));
        }
Exemplo n.º 2
0
        public void UploadFile(string path, string name, byte[] data)
        {
            if (data == null)
            {
                return;
            }
            var storage = new StorageServiceClient();

            var f = new fileEntity
            {
                path     = path,
                fileData = data,
                fileName = name
            };

            try
            {
                storage.AddFileObj(f);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }