How to make users upload large files to the site?

  • 0
    Good evening!
    The task is as follows: there is a landing page with an application form, in which you can attach a file of about 300MB. The collection of applications will be within a week or two. Number of people about 900.

    The question is how to organize file uploads or what methods are there for this.

    So far from the options:
    1) Take a second VDS with a large amount of memory, raise the same apache server and a php script on it to process the ajax request to save the file, return the link to the file and save it to the database.
    2) It seems like yandex cloud provides a storage with get / post requests, and I suppose you can post a file there and save there.
    3) Save as a regular file to the same server as the site.

    In general, in the future I would like to make my own panel where the files would be stored in a separate place, so the topic will be useful for the next projects. Who faced this problem and how did they decide?
    JavaScript Ava Foley, Aug 11, 2020

  • 3 Answers
  • 0
    usually it is enough in the web server and in pkhp to increase the limit on the maximum size of the uploaded file / post-request
    Anonymous

  • 0
    Files can be stored on hosting and automatically deleted after a month. I don’t think you will be overwhelmed with requests, so most cloud hosting services will handle your needs. Be sure to make an indication of the file upload process, otherwise impatient users will think that the form has hung and will try to send it again or leave altogether. There are plenty of examples of how to upload files in JavaScript / PHP without reloading the page, I think you will find everything yourself in the search.



    P. S. Didn't notice your comment about 900 people. In this case, I would recommend taking a closer look at unlimited hosting from SmartApe. Of course, it is not unlimited, but 100 GB there goes out of the box, while about the price of the usual tariff on other other hosting. But if you need more than 100 GB, then it's better to ask those. support.
    Anonymous

  • 0
    2) It seems like yandex cloud provides a storage with get / post requests and I suppose you can post a file there and save there.
    alas, only in theory, in practice there is no free option, incl. and there is no point in considering it.



    this is not a particularly resource-intensive task, unless modification of these files is required.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!