Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: store InlineFiles automatically when passed through to modelAPI's create #1552

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

RutZap
Copy link
Contributor

@RutZap RutZap commented Aug 9, 2024

When creating models with the model api, InlineFiles will be automatically stored before inserting in the db.

export default CreateFromImage(async (ctx, inputs) => {
  const post = await models.post.create({
    image: inputs.image,
    description: inputs.description,
  })
});

Copy link
Contributor

@davenewza davenewza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awwwesome!

@RutZap RutZap merged commit f1a51aa into next Aug 12, 2024
10 checks passed
@RutZap RutZap deleted the automatically-upload-files branch August 12, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants