You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to BaasBox
Hi!
I'm fairly new to Swift and to Baasbox. I'm trying to download a file with the BAAFile class, but keep running into problems. Could anyone give me an working example?
Many thanks in advance!
Tobias
Luca Cardelli
unread,
Oct 10, 2016, 12:24:24 PM10/10/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to BaasBox
Hey Tobias,
In order to download a file from BaasBox with the SDK you need to use the method "BAAFile.loadFileWithId"
An example here
BAAFile.loadFileWithId(id){(data, error)in
if( data !=nil){
self.image =UIImage.init(data:data!)!
}
}
If you are using Swift 3 the methods changes a bit:
BAAFile.load(withId: id){(data, error)in
if( data !=nil){
self.image =UIImage(data: data) }
}
I hope that these snippets will help you in your development.