code: def uploadFromPath(localFilePath, partSize, bucket, fileID, headers):
      
      file_size, file_time = fileSizeAndTime(localFilePath)
      if file_size <= partSize:
          key = bucket.new_key(key_name=bytes(fileID))
          key.name = fileID
          for attempt in retry_s3():
              with attempt:
                  key.set_contents_from_filename(localFilePath, headers=headers)
          version = key.version_id
      else:
          with open(localFilePath, 'rb') as f:
              version = chunkedFileUpload(f, bucket, fileID, file_size, headers, partSize)
      for attempt in retry_s3():
          with attempt:
              key = bucket.get_key(bytes(fileID),
                                   headers=headers,
                                   version_id=version)
      assert key.size == file_size
      # Make reasonably sure that the file wasn't touched during the upload
      assert fileSizeAndTime(localFilePath) == (file_size, file_time)
      return version
docs: Uploads a file to s3, using multipart uploading if applicable
  
      :param str localFilePath: Path of the file to upload to s3
      :param int partSize: max size of each part in the multipart upload, in bytes
      :param boto.s3.Bucket bucket: the s3 bucket to upload to
      :param str fileID: the name of the file to upload to
      :param headers: http headers to use when uploading - generally used for encryption purposes
      :return: version of the newly uploaded file