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

Uploading Audio caf files to aws3 #45

Open
ahmdsdk opened this issue May 29, 2017 · 1 comment
Open

Uploading Audio caf files to aws3 #45

ahmdsdk opened this issue May 29, 2017 · 1 comment

Comments

@ahmdsdk
Copy link

ahmdsdk commented May 29, 2017

Is it possible to upload audio caf files? I've been trying to do that but the uploaded file ends up being 0 bytes..that's the code:

    let file = {
      uri: this.recording.uri,
      name: "sound-test.caf",
      type: "audio/caf",
    }
    let options = {
      keyPrefix: "uploads/" + "admin" + "/tests/",
      bucket: "xxxx-xxxx",
      region: "us-west-1",
      accessKey: "XXXXXX",
      secretKey: "XXXXXX",
      successActionStatus: 201,
    }

    RNS3.put(file, options).then(response => {
      console.log(response.status);
      if (response.status !== 201) {
        throw new Error("failed to upload audio to s3");
      }
      console.log(response.body);
      console.log(response.body.postResponse.location);
    });
@pjammer
Copy link

pjammer commented May 14, 2018

Did you ever resolve this issue?

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