(self, attachment, attachment_src)
Update fields in this attachment with fields from another attachment

        :param attachment: BlobMeta object.
        :param attachment_src: Attachment file name. Used for content type
        guessing if the form attachment has no content type.
Update fields in this attachment with fields from another attachment
Update fields in this attachment with fields from another attachment
def from_form_attachment(self, attachment, attachment_src):
        """
        Update fields in this attachment with fields from another attachment

        :param attachment: BlobMeta object.
        :param attachment_src: Attachment file name. Used for content type
        guessing if the form attachment has no content type.
        """
        self.key = attachment.key
        self.content_length = attachment.content_length
        self.content_type = attachment.content_type
        self.properties = attachment.properties

        if not self.content_type and attachment_src:
            guessed = mimetypes.guess_type(attachment_src)
            if len(guessed) > 0 and guessed[0] is not None:
                self.content_type = guessed[0]
def from_form_attachment ( self , attachment , attachment_src ) : self . key = attachment . key self . content_length = attachment . content_length self . content_type = attachment . content_type self . properties = attachment . properties if not self . content_type and attachment_src : guessed = mimetypes . guess_type ( attachment_src ) if len ( guessed ) > 0 and guessed [ 0 ] is not None : self . content_type = guessed [ 0 ]