Level 88
The only way I know to work around this is creating your own custom field that extends the File field and then you can override the storeAs method. Or add your own storeAsS3 method, as an example.
->disk('s3')
->storeAs(function (Request $request) {
$name = sha1($request->attachment->getClientOriginalName()) . '-'
. now()->format('D_Y-m-d-T_H-m-s') . '-'
. ($request->attachment->getClientOriginalName());
$awsBucket = env("AWS_BUCKET");
$awsRegion = env("AWS_DEFAULT_REGION");
return "https://{$awsBucket}.s3.{$awsRegion}.amazonaws.com/{$name}";
}),
Please or to participate in this conversation.