Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progress #3

Open
imane12 opened this issue Mar 25, 2016 · 3 comments
Open

progress #3

imane12 opened this issue Mar 25, 2016 · 3 comments

Comments

@imane12
Copy link

imane12 commented Mar 25, 2016

I want to upload video and show a progress bar. But the progress is blocked until the upload is completed.

const settings = {
        uri: source.uri,
        uploadUrl: URL,
        method: 'POST',
        fileName: 'one.mp4',
        fieldName: 'upl',
        contentType: 'mp4',
        data: {
        }
      };
      FileUploader.upload(settings, (err, result) => {
        // handle result
        console.log('upload:', err, result);
        if(result!= null){
            console.log(JSON.stringify(result));
        }
      }, (sent, expectedToSend) => {
        // handle progress
        console.log('sent: ' + sent + '\n expexted: ' + expectedToSend);
        var per = Math.floor((sent/expectedToSend)*100);
        console.log('pourcentage: '+ per);
            this.setState({a: true, per: per});
      });
@gorangajic
Copy link

Is that happening on android only? Because I am implementing upload process and everything is blocked until upload is done, but on ios everything works great

@chenzhili
Copy link

Have you solved the problem?

@gorangajic
Copy link

I have not used this package at the end, went with fetch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants