I don't like that checkForCroppedFile() is defined so far away from here.  And it is such a simple function, that you could probably just do it all here.
```
if (activityData.filename.indexOf('.gallery/')) {  // If this is a hidden file
```