php - Android JAVA $_FILE returms empty at files bigger than ~ 50 mb -



php - Android JAVA $_FILE returms empty at files bigger than ~ 50 mb -

problem: trying upload bigger ~ 50 mb files, $_files homecoming empty array.

i seek alter limits on php (a lot of combination) useleass..

my class @ java:

public void upload() throws exception { httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost(this.url); seek { filebody bin = new filebody(this.file); @suppresswarnings("deprecation") multipartentity reqentity = new multipartentity(httpmultipartmode.browser_compatible); reqentity.addpart("file", bin); httppost.setentity(reqentity); system.out.println("requesting : " + httppost.getrequestline()); responsehandler<string> responsehandler = new basicresponsehandler(); string responsebody = httpclient.execute(httppost, responsehandler); system.out.println("responsebody : " + responsebody); } grab (unsupportedencodingexception e) { e.printstacktrace(); } grab (clientprotocolexception e) { e.printstacktrace(); } grab (ioexception e) { e.printstacktrace(); } { httpclient.getconnectionmanager().shutdown(); } }

my php code print array respawn:

<?php ini_set('file_uploads', 1); ini_set('max_file_uploads', '9999999999m'); ini_set('post_max_size', '2000m'); ini_set('max_input_time', 3600); ini_set('max_execution_time', 3600); print_r($_files); ?>

you seek add together mime type of file when create filebody. example:

filebody bin = new filebody(this.file, "application/octect-stream");

another solution utilize httpurlconnection client easier utilize , less error prone. also, google recommends utilize new applications.

java php android file-upload multipartentity

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -