Mime type of faked UploadedFile models not accepted #3469
Replies: 1 comment 1 reply
-
I'd be open for a PR that handles this. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
first of all: thank you for creating this awesome package!
I am trying to create feature tests leveraging the
fake()
method of theIlluminate\Http\UploadedFile
class. However, I am not able to set a custom mime type likeaudio/mpeg
as this is not accepted by the media collection even though its specified in the collection.I am registering the media collection like this:
In the test, I am creating a fake
UploadedFile
model with the custom mime typeaudio/mpeg
and add it to theaudio
collection:However, this fails with the following error:
Apparently, the file size and mime type are not accepted by the media collection. Any ideas how to solve this?
Beta Was this translation helpful? Give feedback.
All reactions