Ejemplo n.º 1
0
        public FilesystemUploadedFile(FilesystemUploadStorageProvider provider, 
		                                string controlUniqueID, string fileName, string contentType,
		                                UploadStorageConfig storageConfig)
            : base(controlUniqueID, fileName, contentType)
        {
            Initialize(provider, controlUniqueID, fileName, contentType, storageConfig);
        }
Ejemplo n.º 2
0
 public FilesystemUploadedFile(FilesystemUploadStorageProvider provider,
                               string controlUniqueID, string fileName, string contentType,
                               UploadStorageConfig storageConfig)
     : base(controlUniqueID, fileName, contentType)
 {
     Initialize(provider, controlUniqueID, fileName, contentType, storageConfig);
 }
Ejemplo n.º 3
0
        private void Initialize(FilesystemUploadStorageProvider provider,
                                string controlUniqueID, string fileName, string contentType,
                                UploadStorageConfig storageConfig)
        {
            DirectoryInfo tmpDirInfo = provider.GetTempDirectory(storageConfig);

            if (log.IsDebugEnabled)
            {
                log.DebugFormat("tmpDirInfo={0}", tmpDirInfo.FullName);
            }
            if (!tmpDirInfo.Exists)
            {
                tmpDirInfo.Create();
            }
            string name = Guid.NewGuid().ToString("N"); // 32 hex digits

            name        = name + ".config";             // ASP.NET blocks requests for .config files.
            tmpFileName = Path.Combine(tmpDirInfo.FullName, name);
            TmpFile     = new FileInfo(tmpFileName);
        }
Ejemplo n.º 4
0
        private void Initialize(FilesystemUploadStorageProvider provider, 
		                                string controlUniqueID, string fileName, string contentType,
		                                UploadStorageConfig storageConfig)
        {
            DirectoryInfo tmpDirInfo = provider.GetTempDirectory(storageConfig);
            if (log.IsDebugEnabled) log.DebugFormat("tmpDirInfo={0}", tmpDirInfo.FullName);
            if (!tmpDirInfo.Exists)
            {
                tmpDirInfo.Create();
            }
            string name = Guid.NewGuid().ToString("N"); // 32 hex digits
            name = name + ".config"; // ASP.NET blocks requests for .config files.
            tmpFileName = Path.Combine(tmpDirInfo.FullName, name);
            TmpFile = new FileInfo(tmpFileName);
        }