I am trying to upload APK files to AWS S3 Bucket but they are being saved as ZIP files.
Laravel 5.6, PHP 7.1.16
This code worked before, but I wanted to change it because the issue of overwriting existing files:
$path = $apkFile->storeAs('update-server', $apkFile->getClientOriginalName(), ['disk' => 's3', 'visibility' => 'public']);
I tried this to upload it with a random filename but it saves the file as ZIP:
$path = Storage::disk('s3')->putFile('update-server', $apkFile, ['mimetype' => 'application/vnd.android.package-archive', 'visibility' => 'public']);
I added mimetype after I found this example: https://github.com/laravel/framework/pull/16416#issuecomment-263599069 but it doesn't seem to work in this case.
I need the S3 storage path to be able to save it in my DB.
Any info in the right direction would help me a lot!