mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: add URLSuffix resource option with S3 (#1428)
* feat: add URLSuffix resource option with S3 * feat: add URLSuffix resource option with S3 * fix: eslint
This commit is contained in:
@@ -25,6 +25,7 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
|
||||
path: "",
|
||||
bucket: "",
|
||||
urlPrefix: "",
|
||||
urlSuffix: "",
|
||||
});
|
||||
const isCreating = storage === undefined;
|
||||
|
||||
@@ -221,6 +222,17 @@ const CreateStorageServiceDialog: React.FC<Props> = (props: Props) => {
|
||||
onChange={(e) => setPartialS3Config({ urlPrefix: e.target.value })}
|
||||
fullWidth
|
||||
/>
|
||||
<Typography className="!mb-1" level="body2">
|
||||
URLSuffix
|
||||
<span className="text-sm text-gray-400 ml-1">(Custom URL suffix; Optional)</span>
|
||||
</Typography>
|
||||
<Input
|
||||
className="mb-2"
|
||||
placeholder="URLSuffix"
|
||||
value={s3Config.urlSuffix}
|
||||
onChange={(e) => setPartialS3Config({ urlSuffix: e.target.value })}
|
||||
fullWidth
|
||||
/>
|
||||
<div className="mt-2 w-full flex flex-row justify-end items-center space-x-1">
|
||||
<Button variant="plain" color="neutral" onClick={handleCloseBtnClick}>
|
||||
Cancel
|
||||
|
1
web/src/types/modules/storage.d.ts
vendored
1
web/src/types/modules/storage.d.ts
vendored
@@ -10,6 +10,7 @@ interface StorageS3Config {
|
||||
path: string;
|
||||
bucket: string;
|
||||
urlPrefix: string;
|
||||
urlSuffix: string;
|
||||
}
|
||||
|
||||
interface StorageConfig {
|
||||
|
Reference in New Issue
Block a user