2
0

♻️ Improve file upload management

Closes #138
This commit is contained in:
Baptiste Arnaud
2022-11-07 08:25:09 +01:00
parent 1f44e8f31f
commit d102fe118c
16 changed files with 110 additions and 52 deletions

View File

@ -52,7 +52,7 @@ export const MyAccountForm = () => {
<Stack>
<UploadButton
size="sm"
filePath={`public/users/${user?.id}/avatar`}
filePath={`users/${user?.id}/avatar`}
leftIcon={<UploadIcon />}
onFileUploaded={handleFileUploaded}
>

View File

@ -37,11 +37,14 @@ export const WorkspaceSettingsForm = ({ onClose }: { onClose: () => void }) => {
<FormControl>
<FormLabel>Icon</FormLabel>
<Flex>
<EditableEmojiOrImageIcon
icon={workspace?.icon}
onChangeIcon={handleChangeIcon}
boxSize="40px"
/>
{workspace && (
<EditableEmojiOrImageIcon
uploadFilePath={`workspaces/${workspace.id}/icon`}
icon={workspace.icon}
onChangeIcon={handleChangeIcon}
boxSize="40px"
/>
)}
</Flex>
</FormControl>
<FormControl>