[cPanel UAPI] The file /home/username/public_html/FILE for user username is larger then the maximum allowed file size of 1 MB.
Hello,
I am trying to get the content of a file using cPanel API but any file larger than 1MB is throwing the following error.
Error: The file "/home/username/public_html/FILE_NAME.log" for user "username" is larger then the maximum allowed file size of 1 MB.
I don't know what are the relevant settings for downloading a file through API but I have increased all the file sizes settings to more than 200MB.
Any help in this regard is appreciated.
Thanks.
-
Hey there! Can you let me know what API you're using, as well as the specific API command you have constructed? Just be sure to leave out any domain names or IP addresses for privacy. 0 -
Hi cPRex, Thanks for your reply. I am using Return File Content API () to retrieve file contents. And this is the request payload I am sending: API URL: https://[server url]:2087/json-api/cpanel Request Payload: Array ( [api.version] => 1 [cpanel_jsonapi_apiversion] => 3 [cpanel_jsonapi_module] => Fileman [cpanel_jsonapi_func] => get_file_content [cpanel_jsonapi_user] => [username] [cpanel_username] => [username] [dir] => /home/[username]/public_html/var/logs/ [file] => [File Name].log ) 0 -
is larger then the maximum
I think you may have misread the error message: I'd hope that than was the correct word used.0 -
Please have a look at the screenshot, this is exactly the response received from the server. 0 -
Yep, a cPanel employee got it wrong! Quelle surprise. 0 -
Thanks for the details - I'm checking this now on my end and I'll update you once I have more information. 0 -
I did confirm with our team that the File Manager tools are limited to 1M in the size of files they can process, as this is generally a tool that should be limited to human-readable text. I created three cases related to the issues mentioned here: -one for the 1M issue, as we need to make that clear in the documentation page -one for "then" vs "than" -one for the typo in the example where it shows "public.html" instead of "public_html" Thanks for bringing this up, @VPSExpert !!! 0 -
Hi cPRex, Okay, thanks for your help and information. Now, I am using a library to fetch file content using SFTP without any limit. 0 -
You're welcome! 0
Please sign in to leave a comment.
Comments
9 comments