Last active
June 24, 2020 17:12
-
-
Save mjzone/a3a1f768ba753418cd9c78b83d8fde09 to your computer and use it in GitHub Desktop.
public access level
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The default access level of the uploads is "public" | |
const handleChange = async (e) => { | |
const file = e.target.files[0]; | |
await Storage.put('picture.jpg', file, { | |
contentType: 'image/jpg' | |
}); | |
} | |
// HTML | |
<input type="file" accept='image/jpg' onChange={(evt) => handleChange(evt)} /> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment