Browsing Tag

genymotion

Pemrograman Mobile React-Native

Tutorial React Native : Upload Gambar Menggunakan Fetch

By on May 25, 2018

Library

https://github.com/marcshilling/react-native-image-picker
Source Code

API
<?php

$target_dir = “uploads/”;
$target_file = $target_dir . basename($_FILES);

$status = array();

if (move_uploaded_file($_FILES, $target_file)) {
$status=1;
$status=’upload berhasil’;
} else {
$status=0;
$status=’upload TIDAK berhasil’;
}
echo json_encode($status);

?>

Page optimized by WP Minify WordPress Plugin