with $file->path()
Oct 25, 2021
1
Level 1
Access Livewire uploaded file
Hello, I'm using Livewire to upload files that after I need to analyze with Apache Tika, using this PHP Library: https://packagist.org/packages/vaites/php-apache-tika
This library gets the file contained in the POST request, usually with the traditional upload of Laravel it's an "UploadedFile" object but with Livewire I get a "TemporaryUploadedFile" object.
The problem is that the file uploaded with Livewire doesn't have the read permission, so the library for Tika returns me an error saying "File /tmp/phpbZpSGZ can't be opened".
How I can make the file uploaded via Livewire readable?
Please or to participate in this conversation.