Skip to content

Instantly share code, notes, and snippets.

View guiathayde's full-sized avatar
🚀
Flying high

Guilherme Athayde guiathayde

🚀
Flying high
View GitHub Profile
@guiathayde
guiathayde / createInstitution.ts
Last active September 30, 2021 22:46
Requisição POST para criação de nova instituição
const onDropFiles = useCallback((files: any) => {
const formData = new FormData();
formData.append('data', JSON.stringify(institution)); // Object with all the institution's data
formData.append('profileImage', files[0]);
formData.append('galleryImages', files[1]);
formData.append('galleryImages', files[2]);
formData.append('galleryImages', files[3]);
formData.append('galleryImages', files[4]);
axios