'Create a new archive and upload the data from the given file
or file-like object.
:type filename: str
:param filename: A filename to upload
:type file_obj: file
:param file_obj: A file-like object to upload
:type description: str
:param description: An optional description for the archive.
:type upload_id_callback: function
:param upload_id_callback: if set, call with the upload_id as the
only parameter when it becomes known, to enable future calls
to resume_archive_from_file in case resume is needed.
:rtype: str
:return: The archive id of the newly created archive'

def create_archive_from_file(self, filename=None, file_obj=None, description=None, upload_id_callback=None):

    part_size = self.DefaultPartSize
    if (not file_obj):
        file_size = os.path.getsize(filename)
        try:
            part_size = minimum_part_size(file_size, part_size)
        except ValueError:
            raise UploadArchiveError('File    size    of    %s    bytes    exceeds    40,000    GB    archive    limit    of    Glacier.')
        file_obj = open(filename, 'rb')
    writer = self.create_archive_writer(description=description, part_size=part_size)
    if upload_id_callback:
        upload_id_callback(writer.upload_id)
    while True:
        data = file_obj.read(part_size)
        if (not data):
            break
        writer.write(data)
    writer.close()
    return writer.get_archive_id()
