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

add custom properties #17

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

PayamOWOW
Copy link
Member

@PayamOWOW PayamOWOW commented Nov 22, 2022

Fixes: #16

@PayamOWOW PayamOWOW added the feature New feature or request label Nov 22, 2022
Copy link
Member

@thomasowow thomasowow left a comment

Choose a reason for hiding this comment

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

Check and fix actions (I see this has not been working for some time)

src/Managers/MediaManager.php Outdated Show resolved Hide resolved
src/Managers/MediaManager.php Outdated Show resolved Hide resolved
@PayamOWOW PayamOWOW requested a review from thomasowow November 22, 2022 14:06
Comment on lines +51 to +53
$media = $this->uploadFromString($model, $files, $name)->toMediaCollection($collection);

return [$this->setCustomProperties($media, $customProperties)];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$media = $this->uploadFromString($model, $files, $name)->toMediaCollection($collection);
return [$this->setCustomProperties($media, $customProperties)];
$media = $this->uploadFromString($model, $files, $name)->withCustomPropreties(...)->toMediaCollection($collection);
return [$media];

Comment on lines +87 to +88
'property_1' => 'Test custom property 1',
'property_2' => 'Test custom property 2',
Copy link
Member

Choose a reason for hiding this comment

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

How exactly are these asserted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for adding custom properties immidiately.
3 participants