Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source Swift Networking Library Providing Easy Multi-Part File Uploading

  •  
  •  
  •  
  •  
  •  

I’ve mentioned a few Swift networking library most recently the python-requests inspired Just library.

Here’s an open source Swift networking library that for large file uploads called Pitaya from JohnLui.

Pitaya features fast multipart uploading, can run asynchronously, and has a nice clean syntax. There is support for basic authorization along with basic file downloading. A set of examples is included.

This code example from the readme shows how to perform a basic file upload:

let file = File(name: "photo", url: NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("Info", ofType: "plist")!)!)
Pitaya.request(.POST, "http://pitayaswift.sinaapp.com/pitaya.php", files: [file], { (error) -> Void in
    NSLog(error.localizedDescription)
    }) { (string) -> Void in
        println(string)
}

You can find Pitaya on Github here.

A nice library for basic http requests and file uploading.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments