big commit

This commit is contained in:
omair saleh
2021-04-05 11:58:32 +08:00
parent fb5dda8cf9
commit b679ae7f40
49 changed files with 1215 additions and 444 deletions
@@ -24,9 +24,6 @@ class ConvertsBase64ToFile
{
$this->path = $path;
$this->filesInfo = [];
File::isDirectory(storage_path($this->path)) or
File::makeDirectory(storage_path($this->path), 0777, true, true);
}
@@ -101,10 +98,9 @@ class ConvertsBase64ToFile
* @throws MalformedRequestException
*/
private function generateFile(FileObject $file, string $suffix = '') {
$filePath = $this->path.'/'.$file->getFileName().$suffix.'.'.$file->getExtension();
$filePath = storage_path($this->path.'/'.$file->getFileName().$suffix.'.'.$file->getExtension());
Storage::put($filePath, $file->getDecodedData());
Storage::disk('documents')->put($filePath, $file->getDecodedData());
return $filePath;