private void uploadPhotos() {
    Log.e(LOG, "..........starting service to upload photos ........ ");

    switch (type) {
      case PhotoUploadDTO.PROJECT_IMAGE:
        PhotoUploadService.uploadProjectPicture(
            ctx, project, currentFullFile, currentThumbFile, location);
        break;
      case PhotoUploadDTO.SITE_IMAGE:
        PhotoUploadService.uploadSitePicture(
            ctx, projectSite, currentFullFile, currentThumbFile, location);
        break;
      case PhotoUploadDTO.STAFF_IMAGE:
        PhotoUploadService.uploadStaffPicture(
            ctx, companyStaff, currentFullFile, currentThumbFile, location);
        break;
      case PhotoUploadDTO.TASK_IMAGE:
        PhotoUploadService.uploadSiteTaskPicture(
            ctx, projectSiteTask, currentFullFile, currentThumbFile, location);
        break;
      default:
        PhotoUploadService.uploadPendingPhotos(ctx);
        break;
    }
    isUploaded = true;
  }
 @Override
 public void onResume() {
   Log.w(LOG, "***************** onResume - starting pending uploads, if any");
   PhotoUploadService.uploadPendingPhotos(ctx);
   super.onResume();
 }