Allow importing .zip or .json file

This commit is contained in:
David Bomba 2021-06-30 09:09:38 +10:00
parent 162d22d85c
commit 9a63a9c44d

View File

@ -220,6 +220,10 @@ class CompanyImport implements ShouldQueue
private function unzipFile()
{
if(mime_content_type(Storage::path($this->file_location)) == 'text/plain')
return Storage::path($this->file_location);
$path = TempFile::filePath(Storage::get($this->file_location), basename($this->file_location));
$zip = new ZipArchive();