移到新目錄(gogs) 並優化 login 及上傳圖片機制
This commit is contained in:
@@ -39,11 +39,11 @@ class ExpenseApiService {
|
||||
// 使用 GenericApiService 內定義的 BASE_IP
|
||||
var request = http.MultipartRequest(
|
||||
'POST',
|
||||
Uri.parse("$BASE_IP/upload/EIS_demo/images")
|
||||
Uri.parse("${GenericApiService.BASE_IP}/upload/EIS_demo/images")
|
||||
);
|
||||
|
||||
// 取得本地檔案名稱
|
||||
String picFileName = "$BASE_IP/upload/EIS_demo/images/" + file.path.split('/').last;
|
||||
String picFileName = "${GenericApiService.BASE_IP}/upload/EIS_demo/images/" + file.path.split('/').last;
|
||||
|
||||
// [修正] index.js 的 multer 配置要求 key 必須是 'file'
|
||||
request.files.add(await http.MultipartFile.fromPath('file', file.path));
|
||||
|
||||
Reference in New Issue
Block a user