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:
Xudong Cai
2023-04-01 15:28:00 +08:00
committed by GitHub
parent 8eed9c267c
commit d21abfc60c
5 changed files with 17 additions and 1 deletions

View File

@@ -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

View File

@@ -10,6 +10,7 @@ interface StorageS3Config {
path: string;
bucket: string;
urlPrefix: string;
urlSuffix: string;
}
interface StorageConfig {