arcanist
arcanist copied to clipboard
File Upload fields
This is currently just a vague idea that popped into my mind. I think it should be possible to define a Field
as an upload
or something similar and let Arcanist take care of actually saving the file.
Currently, you would have to implement the process
method of the Step to deal with uploaded files. This is something I want to discourage as much as possible and provide built-in solutions to problems that require that escape hatch instead.
The API could look something like this
Field::make('avatar')
->file()
->saveTo(storage_path('avatars'));
Arcanist could then take care of saving the uploaded file using whatever storage you have configured in your application and store the file path in the avatar
key.
This idea could potentially be generalized further to add more behavior to fields.
Sooo... basically reimplementing Nova, I guess 😅
Would it be okay if I work on this?