Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

132
Visualizações
Is there a 10MB upload issue with PHP or Javascript?

At the moment I am trying to upload "large" files to a webhosting server. For this I use an input field with multiple='multiple'. Maximum file size is not set for this input field. The PHP version is 7.4. The maximum upload size is set to 256MB by the hoster.

The files are processed by js in a simple loop ( files[ x ] ). The issue is that files larger than 10MB do not get any payload on upload. I generate formdata with file-chunks or full files appended which is only sent when files/chunks are below 10MB or when I let bigger files being sliced via Javascript to chunks under 10MB. The PHP $_FILES- array stays empty on 10MB+ files and the formdata is not available nor shown on upload in chrome/ff dev tools. The requests are sent via jquery $.ajax() after trying fetch and jquery $.POST(). All show the same behaviour. No errors are shown.

By the fact that I can upload 10MB+ files when slicing them to anything under 10MB via javascript slice() and any file below 10MB seems to show me that it is not a script- issue. Files under 10MB work, too when I set the chunk- size to something like 100MB or 200MB which is within the maximum upload size limitation.

Is there any known Apache/nginx server limitation that I might have missed?

Edit 27.05.2022 - 21:00 Here is the code. As you can see it is "nothing too fancy":

    var chunkSize = 100 * 1024 * 1024;
    
    for( var start = 0; start < target.files[ 0 ].size; start +=  chunkSize ){
    var chunk = target.files[ 0 ].slice( start, start + chunkSize );// + 1);
    var fd = new FormData ();
    fd.set( 'data', chunk );
    
await $.ajax({ url : url, type : 'POST', contentType : false, data : fd, cache : false, processData : false
//, dataType : 'formData' 
})

})
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda