Public File Sharing (#72)
* Public File Sharing This implements public file sharing (read-only) with and without passwords (#57). It also fixes a problem with filenames including special characters like `#` not working properly (#71). You can share a directory or a single file, by using the new share icon on the right of the directories/files, and click on it to manage an existing file share (setting a new password, or deleting the file share). There is some other minor cleanup and other copy updates in the README. Closes #57 Fixes #71 * Hide UI elements when sharing isn't allowed
This commit is contained in:
@@ -30,7 +30,9 @@ export default function ListPhotos(
|
||||
return (
|
||||
<article class='hover:opacity-70'>
|
||||
<a
|
||||
href={`/files/open/${file.file_name}?path=${file.parent_path}`}
|
||||
href={`/files/open/${encodeURIComponent(file.file_name)}?path=${
|
||||
encodeURIComponent(file.parent_path)
|
||||
}`}
|
||||
class='flex items-center'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
@@ -39,7 +41,9 @@ export default function ListPhotos(
|
||||
? (
|
||||
<video class='h-auto max-w-full rounded-md' title={file.file_name}>
|
||||
<source
|
||||
src={`/files/open/${file.file_name}?path=${file.parent_path}`}
|
||||
src={`/files/open/${encodeURIComponent(file.file_name)}?path=${
|
||||
encodeURIComponent(file.parent_path)
|
||||
}`}
|
||||
type={`video/${extensionName}`}
|
||||
/>
|
||||
</video>
|
||||
@@ -48,7 +52,9 @@ export default function ListPhotos(
|
||||
{isImage
|
||||
? (
|
||||
<img
|
||||
src={`/photos/thumbnail/${file.file_name}?path=${file.parent_path}`}
|
||||
src={`/photos/thumbnail/${encodeURIComponent(file.file_name)}?path=${
|
||||
encodeURIComponent(file.parent_path)
|
||||
}`}
|
||||
class='h-auto max-w-full rounded-md'
|
||||
alt={file.file_name}
|
||||
title={file.file_name}
|
||||
|
||||
Reference in New Issue
Block a user