07-05-2026
This commit is contained in:
parent
3f3a81a21c
commit
18ca2ce858
11 changed files with 40 additions and 12 deletions
|
|
@ -51,5 +51,8 @@
|
|||
"label": "Vite Dev Server (Web)",
|
||||
"onAutoForward": "notify"
|
||||
}
|
||||
}
|
||||
},
|
||||
"runArgs": [
|
||||
"--network=host"
|
||||
]
|
||||
}
|
||||
|
|
@ -62,6 +62,7 @@ services:
|
|||
MYSQL_EXTRA_OPTIONS: --default-authentication-plugin=mysql_native_password
|
||||
volumes:
|
||||
- '../:/var/www/html'
|
||||
- './php-upload-limits.ini:/etc/php/8.4/cli/conf.d/99-upload-limits.ini:ro'
|
||||
networks:
|
||||
- sail
|
||||
depends_on:
|
||||
|
|
|
|||
2
.devcontainer/php-upload-limits.ini
Normal file
2
.devcontainer/php-upload-limits.ini
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
upload_max_filesize = 210M
|
||||
post_max_size = 210M
|
||||
|
|
@ -63,7 +63,7 @@ class DisplayMediaPicker extends Component
|
|||
{
|
||||
$this->validate([
|
||||
'quickUploads' => 'nullable|array|max:5',
|
||||
'quickUploads.*' => 'file|mimes:jpeg,jpg,png,gif,webp,mp4,webm,mov|max:51200',
|
||||
'quickUploads.*' => 'file|mimes:jpeg,jpg,png,gif,webp,mp4,webm,mov|max:204800',
|
||||
]);
|
||||
|
||||
$service = app(DisplayMediaService::class);
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ return [
|
|||
|
||||
'temporary_file_upload' => [
|
||||
'disk' => null, // Example: 'local', 's3' | Default: 'default'
|
||||
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
|
||||
'rules' => ['required', 'file', 'max:204800'], // 200 MB
|
||||
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
|
||||
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
|
||||
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ services:
|
|||
REDIS_HOST: global-redis
|
||||
volumes:
|
||||
- '.:/var/www/html'
|
||||
- './.devcontainer/php-upload-limits.ini:/etc/php/8.4/cli/conf.d/99-upload-limits.ini:ro'
|
||||
networks:
|
||||
- sail
|
||||
- proxy
|
||||
|
|
|
|||
1
docs/Issues.md
Normal file
1
docs/Issues.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
Wir werden die weiteren Tickets stehen
|
||||
|
|
@ -171,7 +171,7 @@ $tabletStatus = computed(function () {
|
|||
Es besteht aus drei Bereichen, die Sie über die Kacheln oben erreichen:
|
||||
</p>
|
||||
<ul class="mt-2 ml-5 list-disc space-y-1">
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Mediathek</strong> – Zentrale Verwaltung aller Bilder und Videos fuer die Displays. Dateien bis 50 MB direkt hochladen oder groessere Videos als externe URL (Google Drive, OneDrive) einbinden.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Mediathek</strong> - Zentrale Verwaltung aller Bilder und Videos fuer die Displays. Dateien bis 200 MB direkt hochladen oder groessere Videos als externe URL (Google Drive, OneDrive) einbinden.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Versionen</strong> – Content-Pakete, die auf den Displays abgespielt werden. Jede Version hat einen bestimmten Typ und enthält passende Inhalte (Videos, Bilder oder Angebots-Slides).</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Displays</strong> – Die physischen Bildschirme im Showroom. Jedem Display werden eine oder mehrere Versionen als Playlist zugewiesen.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Info-Tablet</strong> – Das Tablet an der Eingangstür des Showrooms. Hier verwalten Sie Öffnungszeiten, den aktuellen Store-Status und Hinweise für Besucher.</li>
|
||||
|
|
@ -190,8 +190,8 @@ $tabletStatus = computed(function () {
|
|||
Sie ist unabhängig von der Website-Mediathek (Flux CMS) und speziell auf die Anforderungen der Displays zugeschnitten.
|
||||
</p>
|
||||
<ul class="mt-2 ml-5 list-disc space-y-1">
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Direkt-Upload:</strong> Bilder und Videos bis 50 MB direkt per Drag-and-drop oder Dateiauswahl hochladen. Die Dateien werden auf dem Server gespeichert und stehen sofort zur Verfügung.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Externe URLs:</strong> Für Videos über 50 MB (z. B. 4K-Showroom-Rundgänge) können Sie einen Freigabe-Link von Google Drive, OneDrive oder anderen Cloud-Diensten hinterlegen. Diese URL wird wie ein normales Medium in der Mediathek verwaltet und kann genauso in Versionen eingebunden werden.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Direkt-Upload:</strong> Bilder und Videos bis 200 MB direkt per Drag-and-drop oder Dateiauswahl hochladen. Die Dateien werden auf dem Server gespeichert und stehen sofort zur Verfügung.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Externe URLs:</strong> Für Videos über 200 MB (z. B. 4K-Showroom-Rundgänge) können Sie einen Freigabe-Link von Google Drive, OneDrive oder anderen Cloud-Diensten hinterlegen. Diese URL wird wie ein normales Medium in der Mediathek verwaltet und kann genauso in Versionen eingebunden werden.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Sammlungen:</strong> Ordnen Sie Medien in Sammlungen wie <em>immobilien</em>, <em>moebel</em> oder <em>brand</em>, um bei vielen Dateien den Überblick zu behalten.</li>
|
||||
<li><strong class="font-medium text-zinc-800 dark:text-zinc-200">Medienauswahl im Editor:</strong> Beim Bearbeiten einer Version erscheint ein „Aus Mediathek"-Button. Darüber öffnen Sie die Medienauswahl und können bestehende Medien wählen oder direkt neue hochladen.</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ $stats = computed(fn () => [
|
|||
$handleUploads = function () {
|
||||
$this->validate([
|
||||
'uploads' => 'nullable|array|max:10',
|
||||
'uploads.*' => 'file|mimes:jpeg,jpg,png,gif,webp,mp4,webm,mov|max:51200',
|
||||
'uploads.*' => 'file|mimes:jpeg,jpg,png,gif,webp,mp4,webm,mov|max:204800',
|
||||
]);
|
||||
|
||||
$service = app(DisplayMediaService::class);
|
||||
|
|
@ -208,7 +208,7 @@ $closeDetail = function () {
|
|||
accept="image/jpeg,image/png,image/gif,image/webp,video/mp4,video/webm,.jpg,.jpeg,.png,.webp,.mp4,.webm,.mov">
|
||||
<flux:file-upload.dropzone
|
||||
heading="Dateien hochladen"
|
||||
text="Bilder & Videos bis 50 MB – Drag & Drop oder klicken"
|
||||
text="Bilder & Videos bis 200 MB - Drag & Drop oder klicken"
|
||||
with-progress />
|
||||
</flux:file-upload>
|
||||
@if (isset($uploads) && count($uploads) > 0)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
accept="image/jpeg,image/png,image/gif,image/webp,video/mp4,video/webm,.jpg,.jpeg,.png,.webp,.mp4,.webm,.mov">
|
||||
<flux:file-upload.dropzone
|
||||
heading="Datei hochladen"
|
||||
text="Bilder bis 50 MB, Videos bis 50 MB – größere Videos bitte über die Mediathek als externe URL anlegen"
|
||||
text="Bilder und Videos bis 200 MB"
|
||||
with-progress />
|
||||
</flux:file-upload>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use App\Models\User;
|
|||
use App\Services\DisplayMediaService;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Livewire\Volt\Volt;
|
||||
use Spatie\Permission\Models\Role;
|
||||
|
||||
beforeEach(function () {
|
||||
|
|
@ -128,7 +129,7 @@ it('stores an uploaded file', function () {
|
|||
->and($media->collection)->toBe('immobilien')
|
||||
->and($media->path)->not->toBeNull();
|
||||
|
||||
Storage::disk('public')->assertExists($media->path);
|
||||
expect(Storage::disk('public')->exists($media->path))->toBeTrue();
|
||||
});
|
||||
|
||||
it('stores a video upload', function () {
|
||||
|
|
@ -141,6 +142,25 @@ it('stores a video upload', function () {
|
|||
->and($media->mime_type)->toBe('video/mp4');
|
||||
});
|
||||
|
||||
it('accepts display media videos up to 200 mb', function () {
|
||||
$file = UploadedFile::fake()->create('showroom.mp4', 204800, 'video/mp4');
|
||||
|
||||
Volt::test('admin.cms.display-media-library')
|
||||
->set('uploads', [$file])
|
||||
->call('handleUploads')
|
||||
->assertHasNoErrors();
|
||||
|
||||
$media = DisplayMedia::query()->first();
|
||||
|
||||
expect($media)->not->toBeNull()
|
||||
->and($media->filename)->toBe('showroom.mp4')
|
||||
->and($media->type)->toBe('video');
|
||||
});
|
||||
|
||||
it('configures livewire temporary uploads up to 200 mb', function () {
|
||||
expect(config('livewire.temporary_file_upload.rules'))->toContain('max:204800');
|
||||
});
|
||||
|
||||
it('creates media from external URL', function () {
|
||||
$service = app(DisplayMediaService::class);
|
||||
|
||||
|
|
@ -165,11 +185,11 @@ it('deletes uploaded media and its file', function () {
|
|||
$media = $service->storeUpload($file);
|
||||
$path = $media->path;
|
||||
|
||||
Storage::disk('public')->assertExists($path);
|
||||
expect(Storage::disk('public')->exists($path))->toBeTrue();
|
||||
|
||||
$service->delete($media);
|
||||
|
||||
Storage::disk('public')->assertMissing($path);
|
||||
expect(Storage::disk('public')->exists($path))->toBeFalse();
|
||||
expect(DisplayMedia::find($media->id))->toBeNull();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue