File Upload Problem

53 views
Skip to first unread message

Syed Munawer Hassan

unread,
May 1, 2024, 1:32:08 PMMay 1
to DroidScript
I am writing a software that automatically upload a file on speedtest server using this code 

function OnStart()
{
    app.UploadFile( "http://speedtest.tele2.net/upload.php", "/sdcard/temp/", '1M.zip" , OnUpload );
}

function OnUpload( error, file, result )
{
    if(error) app.Alert( "Upload Failed!" )
    else app.ShowPopup( "Response:\n" + result, "Upload Successful!" );
}

but it is showing upload failed error while doing this through php or python is working perfectly means no error in upload url can anyone guide me where I am mistaking ? 

Alan Hendry

unread,
May 4, 2024, 3:07:57 PMMay 4
to DroidScript
HI,
You could try the example from the docs (with your URL).
If that works then I suspect that it can't read your local file.
Regards, ah
Reply all
Reply to author
Forward
0 new messages