IOS, Nodejs picture upload problem

  node.js, question

Ios side code:

let image = goodPhoto[0]
 let imageData = UIImageJPEGRepresentation(image, Constants.goodPhotoCompressionQuality)
 
 if let imageData = imageData {
 uploadGoodPhotoWithImageData(imageData)
 bracket
 
 func uploadGoodPhotoWithImageData(imageData: NSData) {
 
 let header: [String : String] = [
 "Authorization": "Bearer \(Provider.readToken())"
 bracket
 
 let name = "good"
 
 let filename = "good.jpg"
 
 Alamofire.upload (.post, urlstring.uploadurlstr plus "/good", headers: nil,
 multipartFormData: {
 multipartFormData in
 
 multipartFormData.appendBodyPart(data: imageData, name: name, fileName: filename, mimeType: "image/jpeg")
 },
 encodingCompletion: {
 encodingResult in
 
 switch encodingResult {
 case .Success(let upload, _, _):
 upload.responseJSON{ response in
 debugPrint(response)
 bracket
 case .Failure(let encodingError):
 print("Upload failed with error: \(encodingError)")
 bracket
 bracket
 )
 bracket

Background code:

var express = require("express");
 var multer = require('multer');
 var app = express();
 
 function handleError(res, err) {
 return res.json(500, err);
 };
 
 var storage = multer.diskStorage({
 destination: function (req, file, callback) {
 console.log('b');
 callback(null, './uploads');
 },
 filename: function (req, file, callback) {
 console.log('b');
 Callback(null, file.fieldname plus'-'plus Date.now ());
 bracket
 });
 
 // var upload = multer({dest: 'photo/good/'}).single('good');
 var upload = multer({storage: storage}).single('good');
 
 exports.uploadGood = function (req, res) {
 
 upload(req, res, function(err) {
 console.log(err);
 if (err) {
 return handleError(res, err);
 bracket
 res.json(200, {msg: "File is uploaded"});
 });
 };

List of HTTP status codes was reported backstage. My console.log(err) is like this
图片描述

Seek a great god’s solution

Could not find the path, perhaps you did not create a new uplaods directory.