我正在尝试使用Alamofire 4.0将Sqlite数据库从IOS Swift 3上传到我的服务器,但在将sqlite文件转换为上传所需的数据类型时遇到了问题。
大多数帖子/问题示例似乎默认为上传图片,但我很难找到上载sqlite或其他文件类型的示例(用于备份)。
我已经搜索了基本代码,并发现到目前为止,这看起来非常合理(感谢下面的帖子:)
let parameters = ["file_name": "swift_file.jpeg"]
Alamofire.upload(multipartFormData: { (multipartFormData) in
像这样的代码(上传图片时执行):
gallery = Gallery.objects.get(id=album_id)
index = gallery.photo_num +1 #index will be used in later
gallery.photo_num = index
gallery.save()
1张图片上传效果很好,但如果同时上传多张图片,使用多张上传jQuery plugin.the "gallery.photo_num“会比较混乱
如何修改代码以避免此问题
目前,我正试图使用Alamofire上传图像,亚马逊的示例实现如下:
.NET版本代码:
private void UploadS3FileByPresignedUrl(string url, string localFile, string contentType)
{
using (var client = new HttpClient())
{
using (var stream = File.OpenRead(localFile))
{
//// Need to ad
当我在App Store中上传构建时,我收到了这样的消息:ERROR ITMS-90081: "This bundle is invalid. Applications built for more than one architecture require an iOS Deployment Target of 3.0 or later."
在我的项目中,我使用的是Xcode10和swift 4.2。在我的pod文件中,我将watchos plateform设置为4.0,并使用Alamofire版本作为pod 'Alamofire','~> 4.
我乘坐的是XCode 6.4。我尝试通过GIT和CocoaPods添加这个项目。
无论是哪种方式,XCode都无法构建带有100多个错误和警告的版本。
还有人看到这种行为吗?
示例:
/Pods/Alamofire/Source/Alamofire.swift:88:5: Extraneous '_' in parameter: 'URLString' has no keyword argument name
/Pods/Alamofire/Source/Alamofire.swift:120:5: Extraneous '_' in para