Hi,
Thanks for this awesome package.
I encountered an issue while uploading files. I could successfully upload image files but when i attempted to upload an audio file, it threw an error. Kindly see attached screenshot. I had tried to use Media::make() instead of Files::make() but no headway.
What do I need to change?
Hi, Thanks for this awesome package. I encountered an issue while uploading files. I could successfully upload image files but when i attempted to upload an audio file, it threw an error. Kindly see attached screenshot. I had tried to use Media::make() instead of Files::make() but no headway. What do I need to change?
Thanks
Resource
`public function fields(Request $request) { return [ ID::make(('ID'), 'id')->sortable(), BelongsTo::make('Album')->showCreateRelationButton(function ($request) { return true; })->required(), Text::make(('Title'), 'title')->required(), Markdown::make('Description'), Text::make(__('Type'), 'type')->required(), Files::make('Upload Song', 'songs')->required(),
}`
Model
`class Song extends Model implements HasMedia { use InteractsWithMedia;
protected $fillable = ['album_id','title', 'description', 'type'];
public function album() { return $this->belongsTo(Album::class); }
public function registerMediaCollections(): void { $this ->addMediaCollection('songs') ->acceptsMimeTypes(['audio/mpeg','video/mpeg']) ->singleFile();
} } `