我试图将Windows 10 UWP应用设置为我的git编辑器。在-(void)uploadImage1:(UIImage *)img Dictionary:(NSMutableDictionary *)dictParam {
NSData *imageData;
if (img == nil) {
}
else {
imageData = UIImageJPEGRepresentation(img, 0.7); // IF you want to compress image
}
AFHTTPRequestSerializer *requestSerializer = [AFHTTPRequestSerializer serializer];
AFHTTPResponseSerializer *responseSerializer = [AFHTTPResponseSerializer serializer];
requestSerializer = [AFJSONRequestSerializer serializer];
responseSerializer = [AFJSONResponseSerializer serializer];
NSError *__autoreleasing* error = NULL;
NSMutableURLRequest *request = [requestSerializer multipartFormRequestWithMethod:@"POST" URLString:"YOUR_URL" parameters:dictParam constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
if (imageData != nil) {
[formData appendPartWithFileData:imageData
name:@"profile_image" // Name of your Image Param
fileName:@"user_image.jpg"
mimeType:@"image/jpg"];
}
} error:(NSError *__autoreleasing *)error];
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
manager.responseSerializer = responseSerializer;
NSURLSessionUploadTask *uploadTask;
uploadTask = [manager uploadTaskWithStreamedRequest:request progress:^(NSProgress * _Nonnull uploadProgress) {
}
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
if (error) {
[SVProgressHUD dismiss];
NSLog(@"ERROR = %@",error.localizedDescription);
}
else {
if ([[responseObject valueForKey:@"status"] intValue] == 1) {
NSLog(@"SUCCESS");
}
else {
NSLog(@"ERROR FROM SERVER = %@", [responseObject valueForKey:@"message"]);
}
}
}];
[uploadTask resume];
}
中,我添加了这一行
.gitconfig
但是,当我尝试[core]
editor = "'C:/Program Files/WindowsApps/ActiproSoftwareLLC.XXXX/CodeWriter.exe'"
时,我得到了
> git rebase -i
有人知道你能解决这个问题吗?