feat: Share-Link Typ 'Nur Upload' (upload_only)
Dritter Link-Typ neben read und write: - upload_only: Nur Dateien hochladen, kein Download, kein Ordnerinhalt sichtbar, Ordnername wird nicht angezeigt Backend-Absicherung: - GET /share/<token>/download gibt 403 bei upload_only - POST /share/<token>/upload erlaubt upload_only + write - GET /share/<token>/info gibt download_allowed zurueck Frontend Share-Dialog: - Drei Optionen: Nur Lesen / Lesen+Hochladen / Nur Upload - Bestehende Links zeigen Typ an Frontend ShareView: - upload_only: Zeigt nur Upload-Zone, kein Dateiname, kein Download - Hinweistext 'Dieser Link erlaubt nur das Hochladen von Dateien' Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,9 +14,10 @@
|
||||
</div>
|
||||
|
||||
<div v-else-if="fileInfo" class="share-info">
|
||||
<h2>{{ fileInfo.name }}</h2>
|
||||
<p class="file-size" v-if="fileInfo.size && !fileInfo.is_folder">{{ formatSize(fileInfo.size) }}</p>
|
||||
<Tag v-if="fileInfo.is_folder" value="Ordner" severity="info" />
|
||||
<h2 v-if="fileInfo.permission !== 'upload_only'">{{ fileInfo.name }}</h2>
|
||||
<h2 v-else>Datei-Upload</h2>
|
||||
<p class="file-size" v-if="fileInfo.size && !fileInfo.is_folder && fileInfo.permission !== 'upload_only'">{{ formatSize(fileInfo.size) }}</p>
|
||||
<Tag v-if="fileInfo.is_folder && fileInfo.permission !== 'upload_only'" value="Ordner" severity="info" />
|
||||
|
||||
<div v-if="fileInfo.has_password && !authenticated" class="password-form">
|
||||
<p>Diese Freigabe ist passwortgeschuetzt.</p>
|
||||
@@ -28,8 +29,8 @@
|
||||
</div>
|
||||
|
||||
<div v-else class="actions-section">
|
||||
<!-- Download (files only) -->
|
||||
<div v-if="!fileInfo.is_folder" class="action-block">
|
||||
<!-- Download (files only, not upload_only) -->
|
||||
<div v-if="!fileInfo.is_folder && fileInfo.download_allowed" class="action-block">
|
||||
<Button
|
||||
label="Herunterladen"
|
||||
icon="pi pi-download"
|
||||
@@ -38,6 +39,11 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Upload-only hint -->
|
||||
<p v-if="fileInfo.permission === 'upload_only'" class="upload-only-hint">
|
||||
Dieser Link erlaubt nur das Hochladen von Dateien.
|
||||
</p>
|
||||
|
||||
<!-- Upload (folders only) -->
|
||||
<div v-if="fileInfo.upload_allowed" class="action-block">
|
||||
<div class="upload-area"
|
||||
@@ -216,4 +222,5 @@ onMounted(loadInfo)
|
||||
.upload-area p { margin: 0.5rem 0; color: var(--p-text-muted-color); font-size: 0.9rem; }
|
||||
.upload-progress { margin-top: 1rem; }
|
||||
.upload-progress p { font-size: 0.85rem; color: var(--p-text-muted-color); margin-top: 0.5rem; }
|
||||
.upload-only-hint { color: var(--p-text-muted-color); font-size: 0.9rem; margin-bottom: 1rem; }
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user