Handle erc-721 media flow
kienvc opened this issue · 0 comments
kienvc commented
Try the flow to avoid download the content file if not necessary:
- Use axios.head() to get response header of media url without download. The header should include Content-Type field
- Filter content-type, only allow to handle content-type start with "image", "audio", "video", "model". If not, return null
- If url is ipfs CID, download and upload to s3. Otherwise, if url is direct link, store it with its content-type.