0
votes

On Parse.com, in a Class I have one column which is AUDIO data. My question is: Does the AUDIO data gets completely removed automatically when I delete the ROW (using a Cloud function)? Or do I need to do something special (before or after) to clean off the AUDIO data?

To make the context clearer here is the kind of code I use to upload the sound data:

    PFFile *parse_Sound;
    NSData *soundData = [NSData dataWithContentsOfURL:myURL];
    parse_Sound = [PFFile fileWithName:@"VOICE"
                                  data:soundData];
    [parse_Sound saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
        ……….
    }];

and later:

    parse_Object = [PFObject objectWithClassName:@"PeraSentence"];
    [parse_Object setObject:parse_Sound forKey:@"AUDIO"];
    ………
2
What is your audio data ? It's a media file ? - Bluety

2 Answers

1
votes

When you delete a row, the files are not deleted. You need to go in Settings > General and click to "Clean Up Files" button.

All files are not referred by pointer in your database are removed.

As you know, files can be referenced to from file-type columns in your objects. They can be pointed to in this manner by one or many different objects, and so they are not deleted automatically when any of the objects that refer to them are deleted. The Clean Up job will delete any files that have no such references to them.

As a safeguard, any files uploaded in the previous hour won't be deleted, regardless of how many objects point to them. This provides a grace period to avoid deleting a file that was recently uploaded but your app has not added a reference to it.

This Clean Up job should be used carefully. If your app is not using the file-type column to refer to files, and instead is copying the CDN URL to a string-type column, this will not count as a reference and the file will be deleted if it has no other file-type pointers to it.

Source: https://parse.com/questions/clean-up-files

1
votes

It depends how you stored it in Parse. If you stored it as data in a column then it lives and dies with the row. Delete the row you delete the data.

If instead you used a Parse File then your row only contains a pointer to the file, delete the row and you delete the pointer, but the file is still there. Same concept as pointers to other records.