rive-app / rive-react

React runtime for Rive

Home Page:https://rive-app.github.io/rive-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS amplify - Problem loading file; may be corrupt!

happy-cutman opened this issue · comments

Conditions:

  • create-react-app
  • .riv file in public folder public/connectButton.riv
  • local build works fine without errors

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;
commented

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

Thank you so much man! I will close this issue