Add explanation for processing responses #2850
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not sure if I missed it somewhere else, but I guess the behaviour is by design like this, but basically we have to call the
toMediaCollection
method to ensure that the database is up to date and that themodel_type
is updated. I was using it with the temporary uploads functionality (which is enabled by default I think) and didn't call the methodtoMediaCollection
because I only have a default one, but noticed that I couldn't retrieve any media-files.After a bit of reading source code and debugging I noticed that we have to call this, so that the
PendingMediaItem
is converted to the associated model.Hope my explanation makes sense.
so my code was basically:
and had to change it to
I am using medialibrary v10 and pro v2 with the blade directives.
Hope this helps