Endpoint: POST /remini (redirect)
Description: Mengunggah file gambar.
Parameters:
Copy
const fetch = require('node-fetch');
const uploadImage = async () => {
const formData = new FormData();
formData.append('image', fs.createReadStream('path/to/image.jpg'));
const response = await fetch('https://api.dannteam.my.id/remini', {
method: 'POST',
body: formData,
});
const imageUrl = await response.text();
console.log('Image URL:', imageUrl);
};
uploadImage();
Copy
POST /remini HTTP/1.1
Host: https://api.dannteam.my.id/
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Copy
curl -X POST -H "Content-Type: multipart/form-data" -F "image=@/path/to/image.jpg" https://api.dannteam.my.id/remini