2
错误,当我使用CI上传S3文件,我得到了错误信息Message: S3::inputFile(): Unable to open input file:filename.jpg
S3上传笨
这里是我的代码
$time = Time();
if(!empty($_FILES['productImage']['name'])){
$file_name = $_FILES['productImage']['name'];
$productImageName = 'PRD_'.$time.$_FILES['productImage']['name'];
if ($this->s3->putObjectFile($file_name, "bucketname", $productImageName, S3::ACL_PUBLIC_READ)) {
echo "We successfully uploaded your file.";exit;
}else{
echo "Something went wrong while uploading your file... sorry.";exit;
}
}