Hello,
I am currently hosting my website on GoDaddy. The system allows file uploads “POST” up to 128MB, but when I try to upload files larger than this, it doesn’t work. I would like to increase the file upload limit to 1GB. Could you please help me with this issue?
I have free 75GB on it, but post max size is restricted
I tried changing .htcaccess but it cause an error
I tried goDaddy support but could not help , they even did not or could not explain what was the problem . than I tried php.ini .user.ini where I wrote code also tried changing my code in react.js so it will allow 1 GB uplaoding but nothing changed. I tried changing page as well but no result was there
1
It sounds like you are encountering a common issue related to server limitations on GoDaddy, particularly around the post_max_size and upload_max_filesize limits. Here’s a step-by-step approach you can try to resolve this issue:
In both php.ini or .user.ini, add or modify these lines:
upload_max_filesize = 1024M
post_max_size = 1024M
max_execution_time = 300
max_input_time = 300
memory_limit = 1024M
Ensure the file is placed in the correct directory (the root of your site), and restart the server or wait a few minutes for the changes to take effect.
You mentioned an error when modifying .htaccess. Ensure your .htaccess changes are correctly formatted. Add these lines at the top of your .htaccess file:
php_value upload_max_filesize 1024M
php_value post_max_size 1024M
php_value memory_limit 1024M
php_value max_execution_time 300
php_value max_input_time 300
React.js File Handling
const handleFileUpload = async (file) => {
const formData = new FormData();
formData.append('file', file);
try {
const response = await axios.post('/upload', formData, {
headers: {
'Content-Type': 'multipart/form-data'
},
onUploadProgress: (progressEvent) => {
const progress = Math.round((progressEvent.loaded / progressEvent.total) * 100);
console.log(`Upload progress: ${progress}%`);
}
});
console.log('File uploaded successfully:', response.data);
} catch (error) {
console.error('Error uploading file:', error);
}
};
If all of this doesn’t work, consider requesting support from a higher-tier GoDaddy agent, as the issue may be with server-level restrictions that only they can change.
3