ios - Difference between uploading PFFile and PFObject -


somebody explain me happens when upload parse this:

pffile *imgfile = [pffile filewithname:@"img.jpg" data:imgdata];      [imgfile saveinbackgroundwithblock:^(bool succeeded, nserror *error) {         if (!error) {              } else {              }      }]; 

if use solution uploaded file? in class? how can retrieve it? i'm bit confused, because i'm using solution in projects, version better because pffile can saved progressblock.

this other way i'm using, in case it's obvious class upload it.

 pffile *imgfileobject = [pffile filewithdata:imgdata];  pfobject *photo = [pfobject objectwithclassname:@"imgclass"];  photo[@"image"] = imgfileobject;  [photo saveinbackgroundwithblock:^(bool succeeded, nserror *error) {                  if (!succeeded) {                    ...                 } else {                  ...                 }             }              }]; 

what's difference between 2 solution in practice?

  1. case using parse remote data storage.. kinda treating parse icloud drive or drobpox. save file

  2. case using parse remote database.. don't save file make new 'row' in database (think of icloud kv store)

=> pffile uploaded remote file (not db entry has no class)

=> pfobject database entry (that can link files or contain data itself)


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -