Skip to content

Add avram attachment#1142

Open
wout wants to merge 9 commits intoluckyframework:mainfrom
wout:add-avram-attachment
Open

Add avram attachment#1142
wout wants to merge 9 commits intoluckyframework:mainfrom
wout:add-avram-attachment

Conversation

@wout
Copy link
Copy Markdown
Contributor

@wout wout commented Mar 15, 2026

This is the Avram counterpart of luckyframework/lucky#2016. It adds the necessary macros and callbacks for models, save operations, and delete operations.

This PR also adds some validations for StoredFile attributes:

# MIME type
validate_file_mime_type_of avatar, in: %w[image/png image/jpeg]
validate_file_mime_type_of avatar, with: /image\/.*/

# File size
validate_file_size_of avatar, max: 5_000_000
validate_file_size_of avatar, min: 1_000, max: 5_000_000
validate_file_size_of avatar, min: 1_000

@wout
Copy link
Copy Markdown
Contributor Author

wout commented Mar 16, 2026

Is the error here related to the recent work on LuckyCache?

@jwoertink
Copy link
Copy Markdown
Member

Yeah, that's fine. Turned out that I spelled that module wrong originally 😬 So latest update fixes the typo lol. We can ignore this failure

@wout
Copy link
Copy Markdown
Contributor Author

wout commented Mar 18, 2026

The latest commit here is related to the latest batch of commits on luckyframework/lucky#2016. It's a minor change.

@jwoertink
Copy link
Copy Markdown
Member

Does this get closed now too since it's gonna move to a shard? Or do we need this?

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