mardi 21 mai 2019

How to upload files more than 1GB to godaddy

I have created an API with laravel for uploading movies to Godaddy's server the maximum max_post_size is 128mb and I want to upload videos more than 1GB size, what should I do?

I tried changing the max_post_size from php.ini but nothing more than 128mb.

     * @param  \Closure  $next
     * @return mixed
     *
     * @throws \Illuminate\Http\Exceptions\PostTooLargeException
     */
    public function handle($request, Closure $next)
    {
        $max = $this->getPostMaxSize();

        if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
            **throw new PostTooLargeException;**
        }

        return $next($request);
    }

    /**
     * Determine the server 'post_max_size' as bytes.
     *
     * @return int
     */
    protected function getPostMaxSize()
    {
        if (is_numeric($postMaxSize = ini_get('post_max_size'))) {
            return (int) $postMaxSize;
        }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire