You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The react code in page "https://inertiajs.com/file-uploads" for uploading files using useForm hook has error. <input type="file" value={data.avatar} onChange={e => setData('avatar', e.target.files[0])} />
The code value={data.avatar} should be removed. it gets error because: InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
The text was updated successfully, but these errors were encountered:
The react code in page "https://inertiajs.com/file-uploads" for uploading files using useForm hook has error.
<input type="file" value={data.avatar} onChange={e => setData('avatar', e.target.files[0])} />
The code
value={data.avatar}
should be removed. it gets error because:InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
The text was updated successfully, but these errors were encountered: