示例#1
0
        public bool Store(string itemPath, IStorageFile storageFile, string contentType = "application/octet-stream")
        {
            bool ret = false;

            using (var mem = new MemoryStream(storageFile.ReadAllBytes()))
            {
                ret = Store(itemPath, mem, contentType);
            }
            return(ret);
        }
示例#2
0
        public IStorageFile StoreAndGetFileStream(string itemPath, IStorageFile storageFile, string contentType = "application/octet-stream")
        {
            IStorageFile file = null;
            var          data = storageFile.ReadAllBytes();

            using (var mem = new MemoryStream(data))
            {
                file = StoreAndGetFileStream(itemPath, mem, contentType);
            }
            return(file);
        }