public function contentType() { return $this->instance->getAttribute("{$this->name}_content_type"); }
/** * Move an uploaded file to it's intended destination. * * @param string $file * @param string $filePath */ public function move($file, $filePath) { $objectConfig = $this->attachedFile->s3_object_config; $fileSpecificConfig = ['Key' => $filePath, 'SourceFile' => $file, 'ContentType' => $this->attachedFile->contentType()]; $mergedConfig = array_merge($objectConfig, $fileSpecificConfig); $this->ensureBucketExists($mergedConfig['Bucket']); $this->s3Client->putObject($mergedConfig); }