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

App will cashed on start of uploading in IOS #12

Open
iqbalfaisal opened this issue Feb 14, 2020 · 3 comments
Open

App will cashed on start of uploading in IOS #12

iqbalfaisal opened this issue Feb 14, 2020 · 3 comments

Comments

@iqbalfaisal
Copy link

App will cashed during uploading in IOS

Simulator Screen Shot - iPhone 11 - 2020-02-14 at 14 24 00

@iqbalfaisal
Copy link
Author

@vinzscam are you there?

@iqbalfaisal iqbalfaisal changed the title App will cashed during uploading in IOS App will cashed on start of uploading in IOS Mar 3, 2020
@vinzscam
Copy link
Owner

Hi,
could you please attach a snippet of your code?
Otherwise it's hard to reproduce the issue.

@iqbalfaisal
Copy link
Author

@vinzscam here's my code.

 const upload = new Upload(file.path || file.uri, {
      headers: Api.headers(),
      endpoint: url,
      retryDelays: [0, 1000, 3000, 5000, 10000, 15000, 20000],
      resume: true,
      metadata: {
        filename: file.fileName ? file.fileName : `${type}.${extension}`,
        filetype: type /* for video fileType : 'video' othervise 'photo' */,
        album: alias,
        default: type != 'video' ? (profile_picture_id ? 1 : 0) : 0,
      },

      onError: error => {
        this.setState({
          modalVisible: false,
        });
        if (error?.originalRequest?._response) {
          Toast.show(JSON.parse(error.originalRequest._response).message, {
            duration: Toast.durations.LONG,
            position: Toast.positions.CENTER,
          });
        }
      },
      onProgress: (uploadedBytes, totalBytes) =>
        this.uploadingProgress(uploadedBytes, totalBytes),
      onSuccess: () => this.onUploadingComplete(type),
    });
    upload.start();

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

2 participants