upload - how to convert .pdf file to base64 string in swift 2.0? -


i have upload document in swift , have using icloud , can upload file server using icloud

swift 3.x

let filepath = ... //url of pdf let filedata = try data.init(contentsof: filepath!) let filestream:string = filedata.base64encodedstring(options: nsdata.base64encodingoptions.init(rawvalue: 0)) 

Comments

Popular posts from this blog

How to use SUM() in MySQL for calculated values -

ios - IBOutlet for image button not correctly referencing button after recreating outlet -

java - AEM: 403 Forbidden occurs when call a Post servlet -