mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
normalize filenames
This commit is contained in:
@@ -21,6 +21,10 @@ class MeetupEventForm extends Component
|
||||
|
||||
public array $series = [];
|
||||
|
||||
public ?string $fromUrl = '';
|
||||
|
||||
protected $queryString = ['fromUrl' => ['except' => '']];
|
||||
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
@@ -52,6 +56,9 @@ class MeetupEventForm extends Component
|
||||
->can('update', $this->meetupEvent)) {
|
||||
abort(403);
|
||||
}
|
||||
if (!$this->fromUrl) {
|
||||
$this->fromUrl = url()->previous();
|
||||
}
|
||||
}
|
||||
|
||||
public function updatedMeetupEventStart($value)
|
||||
|
||||
@@ -57,6 +57,9 @@ class MeetupForm extends Component
|
||||
) {
|
||||
abort(403);
|
||||
}
|
||||
if (!$this->fromUrl) {
|
||||
$this->fromUrl = url()->previous();
|
||||
}
|
||||
}
|
||||
|
||||
public function submit()
|
||||
@@ -66,6 +69,7 @@ class MeetupForm extends Component
|
||||
|
||||
if ($this->image) {
|
||||
$this->meetup->addMedia($this->image)
|
||||
->usingFileName(md5($this->image->getClientOriginalName()).'.'.$this->image->getClientOriginalExtension())
|
||||
->toMediaCollection('logo');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user