Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:admin:media-upload

This is an old revision of the document!


admin/media-upload.php

Source: admin/media-upload.php · 156 lines, ~715 statements · namespace: (global) · `declare(strict_types=1)`: no


Simple Media Upload Handler for SummerNote

This endpoint handles image uploads from SummerNote WYSIWYG editor It's placed in the admin folder so it uses admin session authentication

Includes

^ Mode ^ Target ^ Line ^
| ''require'' | ''require_once __DIR__ . '/../lib/main.php';'' | 26 |

Constants

^ Name ^ Value / expression ^ Line ^
| ''('SCRIPTLOG', hash('sha256', 'BLOGWARE_ADMIN_ACCESS')'' | ''define('SCRIPTLOG', hash('sha256', 'BLOGWARE_ADMIN_ACCESS'))'' | 11 |

Functions (1)

^ Function ^ Line ^ Params ^ Returns ^ Summary ^
| ''sendJsonResponse'' | 129 | 5 |  | Send JSON response and exit |

sendJsonResponse()

public function sendJsonResponse($statusCode, $success, $errorCode = null, $errorMessage = null, $data = null)

Send JSON response and exit

^ Parameter ^ Type ^ Default ^ Description ^
| ''$statusCode'' | ''(untyped)'' | //required// |  |
| ''$success'' | ''(untyped)'' | //required// |  |
| ''$errorCode'' | ''(untyped)'' | ''null'' |  |
| ''$errorMessage'' | ''(untyped)'' | ''null'' |  |
| ''$data'' | ''(untyped)'' | ''null'' |  |

Generated by 'tools/gendoc'.

scriptlog/admin/media-upload.1790413763.txt.gz · Last modified: by admin