App_Code/FCKEditor/Uploader.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * "Support Open Source software. What about a donation today?"
 * 
 * File Name: Uploader.cs
 * 	This is the code behind of the uploader.aspx page used for Quick Uploads.
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
 */

using System ;
using System.Globalization ;
using System.Xml ;
using System.Web ;
using System.IO;

namespace FredCK.FCKeditorV2
{
	public class Uploader : FileWorkerBase
	{
		protected override void OnLoad(EventArgs e)
		{
			// Get the posted file.
			HttpPostedFile oFile = Request.Files["NewFile"] ;

			// Check if the file has been correctly uploaded
			if ( oFile == null || oFile.ContentLength == 0 )
			{
				SendResults( 202 ) ;
				return ;
			}

			int iErrorNumber = 0 ;
			string sFileUrl = "" ;
            string sResourceType = "Image";

			// Get the uploaded file name.
			string sFileName = System.IO.Path.GetFileName( oFile.FileName ) ;

			int iCounter = 0 ;

			while ( true )
			{
                string directory = ServerMapFolder(sResourceType, "/");
                string sFilePath = System.IO.Path.Combine(directory, sFileName);

				if ( System.IO.File.Exists( sFilePath ) )
				{
					iCounter++ ;
					sFileName = 
						System.IO.Path.GetFileNameWithoutExtension( oFile.FileName ) +
后面还有 70 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。