I create api to upload image, it work on postman, but response not found on Android using Multipart data.
this is my snippet
if ($request->hasFile('attachment')) {
$file = $request->file('attachment');
$filename = $file->getClientOriginalName();
$attachmentName = 'bookingfee_' . $bookingData->salesforce_id . '_' . md5($filename) . '.' . $file->getClientOriginalExtension();
$file->move('attachment/', $attachmentName);
$bf = BookingFee::find($bookingfee_id);
$bf->attachment = $attachmentName;
$bf->save();
} else {
$this->result['message'] = 'File not found';
return $this->result;
}
have any clue for this? should i add something to my controller? on my partner code, always return File not Found. i use POST Method