I currently have the code that collects user details
const [nameInput, setNameInput] = useState('');
const [ lastNameInput, setLastNameInput] = useState('');
const [decriptionInput, setDescriptionInput] = useState('');
// is it possible to have a state that will collect multiple images from the user Like:
const [ imagesInput, setImagesInput] = useState([]);
projectFirestore.collection('Posts').add({
name: nameInput,
Lastname: lastNameInput,
description: descriptionInput,
})
// then upload images to the firebase storage and fetch the URLs in array form like
images: ["photo url 0", "Photo url 1", "photoUrl 2"]
And
return (
<div>
<form className="Upload__form">
<input type="text" className="input__name" value={nameInput} onChange={e => setNameInput(e.target.value)}/>
<input type="text" className="lastName" value={lastNameInput} onChange={e => setLastNameInput(e.target.value)}/>
<input type="text" className="description" value={DescriptionInput} onChange={e => setDescriptionInput(e.target.value)}/>
)
then collect the images from the user
<input type="file" multiple className="upload__field" />```