RK
Size: a a a
RK
YK
public function saveVideo($field = null, $rmFile = false, $driver = 'public') {
$this->disk = Storage::disk($driver);
$this->field = $field ? $field : $this->field;
$this->file = $this->request->file($this->field);
$name = $this->file->getClientOriginalName();
\Debugbar::info($name);
$path = $this->disk->put("upload", $this->file);
$this->collection = File::create([
'name' => $name,
'path' => '/'.$path,
'storage' => $driver,
'prefix' => isset(Config::get('filesystems.disks')[$driver]['prefix']) ? Config::get('filesystems.disks')[$driver]['prefix'] : "",
]);
return $this;
}
RK
YK
YK
RK
RK
YK
RK
RK
YK
RK
YK
YK
RK
YK
YK
RK
RK