How to allow large file upload in my VM

DOMINIQUE WEYAND 0 Reputation points
2024-04-30T08:02:04.4566667+00:00

When I try to upload a large file into my VM (15 MB), I get an "Internal Server Error". The App running in the VM does not limit the file size so the problem should be in VM parameters setting : is there a parameter in the VM to allow larger files uploading ?

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,301 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 47,021 Reputation points Microsoft Employee
    2024-05-01T08:43:52.5833333+00:00

    @DOMINIQUE WEYAND Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    May I know how are you trying to upload?
    As I understand you are using Azure Files storage to upload files to Azure VM?
    Can you share the complete screenshot of the error message?

    Yes, there are several parameters in the VM that can be adjusted to allow larger file uploading. The two parameters that are most likely causing the issue are upload_max_filesize and post_max_size. These parameters control the maximum size of files that can be uploaded and the maximum size of POST data that PHP will accept, respectively.

    To increase the maximum file size that can be uploaded, you can adjust the upload_max_filesize parameter in your PHP configuration file. The default value for this parameter is 50 MB, but it can be increased up to 256 MB. To do this, you can add the following line to your PHP configuration file:

    upload_max_filesize
    

    To increase the maximum size of POST data that PHP will accept, you can adjust the post_max_size parameter in your PHP configuration file. The default value for this parameter is 128 MB, but it can be increased up to 256 MB. To do this, you can add the following line to your PHP configuration file:

    post_max_size
    

    Once you have made these changes, you will need to restart your web server for the changes to take effect.
    Please let us know if you have any further queries. I’m happy to assist you further.    


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  2. DOMINIQUE WEYAND 0 Reputation points
    2024-05-06T08:15:57.82+00:00

    Hi Sumarigo,

    thank you for your answer. The file uploading is used by the application running on the VM to analyse its content for security analysis. See below the snapshot of the error.

    I would like to know how can I access to the correspondning VM log file to have more information concerning this error.

    I don't think that the "upload_max_filesize"parameter can fix this error since the file I try to upload is 15 MB and you said that the default max filesize is 50MB.

    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.