step 9 : proses rekaman dan upload rekaman ke BE
This commit is contained in:
@@ -9,16 +9,12 @@ abstract class BaseRepository {
|
||||
|
||||
// POST audio
|
||||
Future<Map<String, dynamic>> postAudio({
|
||||
required String filePath,
|
||||
// required String filePath,
|
||||
required FormData formData,
|
||||
required String service,
|
||||
String? token,
|
||||
}) async {
|
||||
try {
|
||||
FormData formData = FormData.fromMap({
|
||||
"audio":
|
||||
await MultipartFile.fromFile(filePath, filename: "rekaman.mp3"),
|
||||
});
|
||||
|
||||
final response = await dio.post(
|
||||
// Constant.baseUrl + service,
|
||||
service,
|
||||
|
||||
Reference in New Issue
Block a user