I am having a difficult time with Parse.com.
I save a PFFile through my app, using the following code... (truncated to relevant info.)
let alertXMLFile = PFObject(className: "Message")
do {
alertXMLFile["alertFile"] = try PFFile(name: "alertFile.xml", data: data!)
} catch {
print("upload fail")
}
alertXMLFile.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in
}
}
When I go to the web and view the file, I click on it and it downloads instead of showing in the browser. (The download also happens if I copy the link and paste into another browser) I can take that downloaded file, upload it via the web into my class, click on it, and it shows in the browser. My app will also properly recognize the manually uploaded file and execute as expected .
My question is, how to save a PFFile to Parse.com in iOS via Swift 2.1 that will not be a forced downloadable object, but will react as if manually uploaded?
Here is a link to a successfully saved file... http://files.parsetfss.com/277284ac-afb0-445c-b352-863782ca3acd/tfss-0c5b843d-d1cf-4b85-a9f5-aebff98d656c-alertData.xml