所以我有一个应用程序,上传图像到ftp服务器使用此代码:
try {
File fileToUpload = File(filePathPharmacy);
await ftpConnect.connect();
await ftpConnect.changeDirectory(
"/public_html/XXXXXX/XXXXXX/main/assets/userImags");
bool res =
await ftpConnect.uploadFileWithRetry(fileToUpload, pRetryCount: 3);
await ftpConnect.disconnect();
print(res);
} catch (w) {
print("error : $w");
}
解释:
filePathPharmacy => Is the Path of the file . Example :- /data/user/0/come.adeeb.smartbureau/app_flutter/b2042f2e-bd9e-4d91-8775-7b8e26d124886989878843844875758.jpg
XXXXXX => is my location on the server (I hade it for security)
成功了!我就能在FTP服务器上找到文件
但图像分辨率不好或它遭受奇怪的扭曲!
有办法解决吗?
1条答案
按热度按时间dfuffjeb1#
将以下命令置于
命令: