feat: Store image uploads as attachments in database (#1144)
* First pass * Documentation * Added optional documentId relationship * name -> key * cleanup: No need for separate documentId prop
This commit is contained in:
@ -15,6 +15,7 @@ import Embed from './Embed';
|
||||
import embeds from '../../embeds';
|
||||
|
||||
type Props = {
|
||||
id: string,
|
||||
defaultValue?: string,
|
||||
readOnly?: boolean,
|
||||
grow?: boolean,
|
||||
@ -28,7 +29,7 @@ class Editor extends React.Component<Props> {
|
||||
@observable redirectTo: ?string;
|
||||
|
||||
onUploadImage = async (file: File) => {
|
||||
const result = await uploadFile(file);
|
||||
const result = await uploadFile(file, { documentId: this.props.id });
|
||||
return result.url;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user