[英]File upload not working more than 10mb in AWS Linux 2 server?
當我嘗試上傳超過 10mb 的視頻時,服務器顯示錯誤502我在 php.ini 文件中也進行了更改,phpinfo 也反映了更改
post_max_size 40M
upload_max_filesize 35M
max_execution_time 1200
max_input_time
<?php
error_reporting(E_ALL);
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded.";
} else {
echo "Sorry, there was an error uploading your file.";
}
?>
<!DOCTYPE html>
<html>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<input type="submit" value="Upload Image" name="submit">
</form>
</body>
</html>
您使用 API 網關嗎? 它對有效載荷大小有 10Mb 的限制。 請參見:
https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.