rive-app / rive-react

React runtime for Rive
https://rive-app.github.io/rive-react
MIT License
759 stars 28 forks source link

AWS amplify - Problem loading file; may be corrupt! #176

Closed happy-cutman closed 1 year ago

happy-cutman commented 1 year ago

Conditions:

The error occurs on a deployed application. sees the file, but does not seem to recognize it

image

The same file on local build

image

const WalletAnimation = () => {
  const { rive, RiveComponent } = useRive({
    src: 'connectButton.riv',
    autoplay: true
  });

 return (
    <Wrapper>
      <RiveComponent/>
    </Wrapper>
  );
};

export default WalletAnimation;
caudetgit commented 1 year ago

@happy-cutman You may need to specify the mimetype in Amplify for .riv (application/octet-stream)

happy-cutman commented 1 year ago

Thank you so much man! I will close this issue