test media

This commit is contained in:
CHIEFSOFT\ameye
2023-07-25 11:27:13 -04:00
parent 5c1e6d5c5d
commit 3700d9fe5a
3 changed files with 13 additions and 0 deletions
+1
View File
@@ -191,6 +191,7 @@ $routes->post('/en/wrench/api/v1/mynotifications', 'WrenchNotifications::
$routes->post('/en/wrench/api/v1/dashrecent', 'WrenchDashRecent::apigate');
$routes->post('/en/wrench/api/v1/getmedia', 'WrenchMedia::apigate');
$routes->get('/en/wrench/api/v1/getmedia', 'WrenchMedia::apigate');
// cron jobs ------------ ===== ------------
$routes->post('/en/wrench/api/v1/cron', 'WrenchCrons::apigate');
+12
View File
@@ -29,6 +29,18 @@ class WrenchMedia extends BaseController
}
public function apigate(){
$file = __DIR__ . DIRECTORY_SEPARATOR . "books.png";
$fileData = exif_read_data($file);
ob_start();
header("Content-Type: " . $fileData["MimeType"]);
header("Content-Length: " . $fileData["FileSize"]);
readfile($file);
ob_end_flush();
}
public function apigate33(){
log_message('critical', "Oauth-Gate");
header('Access-Control-Allow-Origin: *');
log_message('critical', "0002");
Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB