question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error During upload

See original GitHub issue

hi, am trying to upload mp4 file from device storage but am keep geting error the code am using is

                UploadService.NAMESPACE = BuildConfig.APPLICATION_ID;

                final String uploadID = UUID.randomUUID().toString();
                final String serverUrlString = "http://xxyyzz.com/mmff/upload.php";

                try {

                    new MultipartUploadRequest(context, uploadID, serverUrlString)
                            .addFileToUpload(Environment.getExternalStorageDirectory().getAbsolutePath() + "/file2.mp4", "your-param-name")
                            .addHeader("your-custom-header-name", "your-custom-value")
                            .addParameter("your-param-name", "your-param-value")
                            .setNotificationConfig(new UploadNotificationConfig())
                            .setMaxRetries(2)
                            .startUpload();

                } catch (Exception exc) {
                    Log.e("AndroidUploadService", exc.getMessage(), exc);
                }

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:21

github_iconTop GitHub Comments

1reaction
firaskudsycommented, Dec 28, 2015

i found th eproblem, the php file path for the server was wrong, but i didnt get any error related to the server path, now am getting upload completed successfully but i cant find the file in the server, am using the folowing code in my php script

<?php $file_path = "uploads/"; $file_path = $file_path . basename( $_FILES['uploaded_file']['name']); if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $file_path)) { echo "success"; } else{ echo "fail"; } ?>
0reactions
alexbbbcommented, Dec 28, 2015

😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common uploading errors - YouTube Help
If you're having problems uploading your video, select the error message you're seeing and follow the troubleshooting steps to solve your issue.
Read more >
How to Solve File Upload Errors in Google Drive - MakeUseOf
1. Check Google Drive's Status · 2. Check Your Network Connection · 3. Disable Antivirus and Firewall · 4. Restart Backup and Sync...
Read more >
Error Message: There are errors below. Hover over each for ...
Troubleshooting errors while uploading an image to the Library. We're sorry you're having trouble uploading an image!
Read more >
Error Messages Explained - Manual - PHP
The error code can be found in the error segment of the file array that is created during the file upload by PHP....
Read more >
An error occurred in the upload. Please try again later
Failed File Upload – “An error occurred in the upload. Please try again later” ... This may be a disk space issue. Check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found