<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://docs-old.ckeditor.com/index.php?action=history&amp;feed=atom&amp;title=CKFinder_2.x%2FServer_Side_Integration%2FThe_Commands%2FQuickUpload</id>
		<title>CKFinder 2.x/Server Side Integration/The Commands/QuickUpload - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://docs-old.ckeditor.com/index.php?action=history&amp;feed=atom&amp;title=CKFinder_2.x%2FServer_Side_Integration%2FThe_Commands%2FQuickUpload"/>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKFinder_2.x/Server_Side_Integration/The_Commands/QuickUpload&amp;action=history"/>
		<updated>2026-04-05T20:10:51Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://docs-old.ckeditor.com/index.php?title=CKFinder_2.x/Server_Side_Integration/The_Commands/QuickUpload&amp;diff=3038&amp;oldid=prev</id>
		<title>Wiktor: Created page with '{{CKFinder_2.x_SSI_Warning}} == QuickUpload ==  Adds a file in a folder. &lt;br&gt;This command is pretty similar to the [[CKFinder/Server Side Integration/The Commands/FileUpload|File…'</title>
		<link rel="alternate" type="text/html" href="https://docs-old.ckeditor.com/index.php?title=CKFinder_2.x/Server_Side_Integration/The_Commands/QuickUpload&amp;diff=3038&amp;oldid=prev"/>
				<updated>2010-05-14T20:08:05Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{CKFinder_2.x_SSI_Warning}} == QuickUpload ==  Adds a file in a folder. &amp;lt;br&amp;gt;This command is pretty similar to the [[CKFinder/Server Side Integration/The Commands/FileUpload|File…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{CKFinder_2.x_SSI_Warning}}&lt;br /&gt;
== QuickUpload ==&lt;br /&gt;
&lt;br /&gt;
Adds a file in a folder. &amp;lt;br&amp;gt;This command is pretty similar to the [[CKFinder/Server Side Integration/The Commands/FileUpload|FileUpload]] command. It is used by FCKeditor 2.x and CKEditor 3.x. There are some differences between data that is sent by FCKeditor and CKEditor (and expected response), please read documentation below carefully.&lt;br /&gt;
&lt;br /&gt;
=== Sample Request ===&lt;br /&gt;
&lt;br /&gt;
Upload a file in the root directory of the resource type “Files”.&lt;br /&gt;
&amp;lt;pre&amp;gt;connector.php?command=QuickUpload&amp;amp;amp;type=Files&amp;amp;amp;currentFolder=%2F&amp;lt;/pre&amp;gt;&lt;br /&gt;
The request will be done using POST (instead of GET) and the data will encoded in “multipart/form-data”. Only one field will be posted, named '''“NewFile” (FCKeditor) or “upload” (CKEditor)''', containing the file uploaded data.&lt;br /&gt;
&lt;br /&gt;
=== Response ===&lt;br /&gt;
&lt;br /&gt;
This command doesn’t expect XML to be returned. Actually HTML must return with a &amp;amp;lt;script&amp;amp;gt; tag. The content type must be “text/html”. The JavaScript code expected by CKEditor and FCKeditor is different.&lt;br /&gt;
&lt;br /&gt;
=== Sample Response (FCKeditor) ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;amp;gt;&lt;br /&gt;
window.parent.OnUploadCompleted(0, '/ckfinder/userfiles/files/filename.txt', 'filename.txt', '') &amp;amp;nbsp;;&lt;br /&gt;
&amp;amp;lt;/script&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;The &amp;quot;OnUploadCompleted&amp;quot; is a JavaScript function that is called to expose the upload result.&lt;br /&gt;
&lt;br /&gt;
The possible values are:&lt;br /&gt;
&lt;br /&gt;
* OnUploadCompleted( 0 , &amp;quot;/full/path/to/the/filename.txt&amp;quot;, &amp;quot;filename.txt&amp;quot; );&amp;amp;nbsp;: no errors found on the upload process.&lt;br /&gt;
* OnUploadCompleted( 1, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;Reason&amp;quot; );&amp;amp;nbsp;: the upload filed because of &amp;quot;Reason&amp;quot;. Note: no paths being sent here, because uploading failed.&lt;br /&gt;
* OnUploadCompleted( 201 , &amp;quot;/full/path/to/the/filename.txt(1)&amp;quot;, &amp;quot;filename.txt(1)&amp;quot; );&amp;amp;nbsp;: the file has been uploaded successfully, but its name has been changed to &amp;quot;filename(1).ext&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note that uploaded file names may contain non ASC-II chars.&lt;br /&gt;
&lt;br /&gt;
=== Sample Response (CKEditor) ===&lt;br /&gt;
&lt;br /&gt;
CKEditor sends some additional parameters when sending the QuickUpload command:&lt;br /&gt;
&amp;lt;pre&amp;gt;connector.php?command=QuickUpload&amp;amp;type=Images&amp;amp;currentFolder=%2F&amp;amp;CKEditor=editor1&amp;amp;CKEditorFuncNum=2&amp;amp;langCode=en&amp;lt;/pre&amp;gt;&lt;br /&gt;
* CKEditor - the name of the CKEditor instance&lt;br /&gt;
* langCode - the current language code&lt;br /&gt;
* CKEditorFuncNum - a parameter to specify the callback function&lt;br /&gt;
(see: [[CKEditor_3.x/Developers_Guide/File_Browser_(Uploader)/Custom_File_Browser|Custom File Browser]])&lt;br /&gt;
&lt;br /&gt;
There are no special error numbers in the callback function. Your script can return a url to use and a message to show to the user, both are optional so you can return just an URL that will be used in the dialog, or you can return a message that will be shown to the user, or a URL and a message (for example a warning that the file has been renamed and the new URL).&lt;br /&gt;
&lt;br /&gt;
Thanks to the message and the &amp;quot;langCode&amp;quot; parameter you can use localized messages instead of having them in English.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;script type='text/javascript'&amp;gt;window.parent.CKEDITOR.tools.callFunction(funcNum, fileUrl, message)&amp;lt;/script&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wiktor</name></author>	</entry>

	</feed>