upload files to Dropbox from iOS app with Swift -
i have completed tutorial(https://blogs.dropbox.com/developers/2014/09/swift-apps-with-dropbox/) , linked ios app dropbox. however, want upload file app dropbox. tutorials out there have code in objective c, including main 1 dropbox (https://www.dropbox.com/developers/core/start/ios). does know how swift?
thanks!
it works.
let textcontent = "hello swift upload" let textdata:nsdata? = textcontent.datausingencoding(nsutf8stringencoding) var client:dropboxclient? = dropbox.authorizedclient if let cli = client { cli.files.upload(path: "/swift-upload.txt", mode: files.writemode.add, autorename: false, clientmodified: nil, mute: false, body: textdata!) }
Comments
Post a Comment