示例#1
0
 public string CreateFileCallback(string requestedFileName)
 {
     if (ImageSupportingFile == null)
     {
         ImageSupportingFile = _fileService.CreateSupportingFile(requestedFileName, new MemoryStream(new byte[0]));
     }
     else
     {
         ImageSupportingFile = ImageSupportingFile.UpdateFile(new MemoryStream(new byte[0]), requestedFileName);
     }
     return(ImageSupportingFile.FileUri.LocalPath);
 }
        public string AddFile(string fileName, Stream s)
        {
            ISupportingFile file = GetSupportingFile(fileName);

            if (file == null)
            {
                file = _fileService.CreateSupportingFile(fileName, s);
            }
            else
            {
                file = file.UpdateFile(s);
            }
            _fileIds[fileName] = file;

            return(file.FileId);
        }