added a help system, replaced the words "tenant" and "Pwa" with better alternatives. corrected and implemented cron jobs. prepared going live on a coolify-powered system.
This commit is contained in:
@@ -153,14 +153,12 @@ class PhotoController extends Controller
|
||||
$thumbnailPath = $thumbnailRelative;
|
||||
}
|
||||
|
||||
// Create photo record
|
||||
$photo = Photo::create([
|
||||
$photoAttributes = [
|
||||
'event_id' => $event->id,
|
||||
'filename' => $filename,
|
||||
'original_name' => $file->getClientOriginalName(),
|
||||
'mime_type' => $file->getMimeType(),
|
||||
'size' => $file->getSize(),
|
||||
'path' => $path,
|
||||
'file_path' => $path,
|
||||
'thumbnail_path' => $thumbnailPath,
|
||||
'width' => null, // Filled below
|
||||
'height' => null,
|
||||
@@ -168,7 +166,17 @@ class PhotoController extends Controller
|
||||
'uploader_id' => null,
|
||||
'ip_address' => $request->ip(),
|
||||
'user_agent' => $request->userAgent(),
|
||||
]);
|
||||
'ingest_source' => Photo::SOURCE_TENANT_ADMIN,
|
||||
];
|
||||
|
||||
if (Photo::supportsFilenameColumn()) {
|
||||
$photoAttributes['filename'] = $filename;
|
||||
}
|
||||
if (Photo::hasColumn('path')) {
|
||||
$photoAttributes['path'] = $path;
|
||||
}
|
||||
|
||||
$photo = Photo::create($photoAttributes);
|
||||
|
||||
// Record primary asset metadata
|
||||
$checksum = hash_file('sha256', $file->getRealPath());
|
||||
@@ -663,19 +671,27 @@ class PhotoController extends Controller
|
||||
$thumbnailPath = $thumbnailRelative;
|
||||
}
|
||||
|
||||
// Create photo record
|
||||
$photo = Photo::create([
|
||||
$photoAttributes = [
|
||||
'event_id' => $event->id,
|
||||
'filename' => $filename,
|
||||
'original_name' => $request->original_name,
|
||||
'mime_type' => $file->getMimeType(),
|
||||
'size' => $file->getSize(),
|
||||
'path' => $path,
|
||||
'file_path' => $path,
|
||||
'thumbnail_path' => $thumbnailPath,
|
||||
'status' => 'pending',
|
||||
'ip_address' => $request->ip(),
|
||||
'user_agent' => $request->userAgent(),
|
||||
]);
|
||||
'ingest_source' => Photo::SOURCE_TENANT_ADMIN,
|
||||
];
|
||||
|
||||
if (Photo::supportsFilenameColumn()) {
|
||||
$photoAttributes['filename'] = $filename;
|
||||
}
|
||||
if (Photo::hasColumn('path')) {
|
||||
$photoAttributes['path'] = $path;
|
||||
}
|
||||
|
||||
$photo = Photo::create($photoAttributes);
|
||||
|
||||
[$width, $height] = getimagesize($file->getRealPath());
|
||||
$photo->update(['width' => $width, 'height' => $height]);
|
||||
|
||||
Reference in New Issue
Block a user