Skip to content

Commit

Permalink
fix: avoid out of memory when minting large files (#346)
Browse files Browse the repository at this point in the history
closes #280
  • Loading branch information
Zir0h authored Oct 27, 2023
1 parent 8e5800b commit c89df4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/form/MintForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export default function MintForm() {
.show(`File too big: ${data.artifact.file.size / 1e6}mb`)
return
}
const URL = window.URL || window.webkitURL
data.artifact.reader = URL.createObjectURL(data.artifact.file)
}
useMintStore.setState({ ...data, isValid: true })
navigate('preview')
Expand Down
2 changes: 1 addition & 1 deletion src/pages/mint/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const fields = [
type: 'file',
watch: true,
rules: {
required: 'No file selected',
required: 'You did not select a valid file',
},
},
{
Expand Down

0 comments on commit c89df4f

Please sign in to comment.