Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
Cómo cargar el ID de usuario junto con una imagen en el servidor Swift

Me gustaría subir una imagen junto con otro entero a mi servidor. Actualmente, solo envío la imagen al servidor usando Alamofire desde la aplicación ios. Vea el código a continuación:

 func uploadPicture() { let url = "my-server-url" let image = #imageLiteral(resourceName: "capitan") let imageData = UIImageJPEGRepresentation(image, 1.0)! Alamofire.upload( multipartFormData: { multipartFormData in multipartFormData.append(imageData, withName: "photo", fileName: "photo.jpg", mimeType: "image/jpg") }, to: url, encodingCompletion: { encodingResult in switch encodingResult { case .success(let upload, _, _): upload.responseJSON { response in debugPrint(response) } case .failure(let encodingError): print(encodingError) } } )}

Mientras estoy en el backend, estoy usando nodejs junto con mutler.

 var upload = multer({ storage : storage}).any(); app.post('/upload', function(req, resp) { upload(req, resp, function(err) { console.log("req:" + req); if(!err) { console.log("Upload complete."); resp.send(JSON.stringify(true)); } else { console.log(err); resp.send(JSON.stringify(false)); } }); });
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!