它是AWS的Laravel。几个月前,上传在本地和AWS都运行良好。它们是部署的相同代码。我抓获了Input::all()
:
在本地工作 :( Mac上的apache)
Array
(
[_token] => abc……
[text] =>
[file] => Symfony\Component\HttpFoundation\File\UploadedFile Object
(
[test:Symfony\Component\HttpFoundation\File\UploadedFile:private] =>
[originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => file.txt
[mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => text/plain
[size:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 18
[error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0
[pathName:SplFileInfo:private] => /private/var/tmp/phpetUgq0
[fileName:SplFileInfo:private] => phpetUgq0
)
)
在AWS失败:
Array
(
[_token] => xyc……
[text] =>
[file] => Symfony\Component\HttpFoundation\File\UploadedFile Object
(
[test:Symfony\Component\HttpFoundation\File\UploadedFile:private] =>
[originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => file.txt
[mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => application/octet-stream
[size:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0
[error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 6
[pathName:SplFileInfo:private] =>
[fileName:SplFileInfo:private] =>
)
)
没有常见错误,例如它必须是enctype="multipart/form-data"
等,我已重新启动httpd
和mysqld
。
我担心它可能是一个基本的东西,但我不知道我应该看哪个方向。你能告诉我任何可能吗?谢谢!