【问题标题】:FTP upload with alamofire?使用 alamofire 进行 FTP 上传?
【发布时间】:2017-03-07 00:33:12
【问题描述】:

我不知道我做错了什么?谁能帮忙

   let imageData = UIImageJPEGRepresentation(pickedImage, 30)!

        Alamofire.upload(imageData, to: "ftp://username:password@ip:21/")
            .uploadProgress{ Progress in print("Upload Progress : \(Progress.fractionCompleted)")}
            .responseJSON(completionHandler: { response in
                debugPrint(response)
            })

错误:

responseSerializationFailed(Alamofire.AFError.ResponseSerializationFailureReason.jsonSerializationFailed(Error Domain=NSCocoaErrorDomain Code=3840 "Number with minus sign but no digits around character 1." UserInfo={NSDebugDescription=Number with minus sign but no digits around character 1.}))

使用 xcode8 和 swift。

【问题讨论】:

    标签: ios swift ftp alamofire xcode8


    【解决方案1】:

    您应该使用不同的库。 Alamofire 仅支持 http/https 协议。

    【讨论】:

    • 你对另一个库有什么想法吗?
    猜你喜欢
    • 2011-06-11
    • 1970-01-01
    • 2013-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-17
    • 1970-01-01
    相关资源
    最近更新 更多