react-native에서 네이버 클라우드펑션의 php로 업로드할때
let formData = new FormData(); formData.append('name', '이름); formData.append('phone', '123-123-123); formData.append('photo[]', { uri: '이미지주소', name: '파일명', 'image/jpeg' }); try { let response = await fetch("네이버 클라우드펑션/json", { method: 'POST', body: formData, headers: { 'content-type': 'multipart/form-data', }, }); let responseJson = await response.json(); console.log(responseJson); } catch (err..
[react native] firebase database를 이용한 메모장 앱 만들기
import { StatusBar } from 'expo-status-bar'; import React, { useState, useRef, useEffect } from 'react'; import {TextInput, SafeAreaView, FlatList, Button, StyleSheet, Text, View } from 'react-native'; import * as firebase from 'firebase'; var firebaseConfig = { apiKey: "--", authDomain: "--", projectId: "--", storageBucket: "--", messagingSenderId: "--", appId: "--" }; if(firebase.apps.length==..