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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

amazon web services - When using Cognito credentials with AWS in a browser (javascript), keep getting "missing credentials" error -

c# - How to set the datatextfield value instead of the value on a drop down list? -