-
public final class AttachmentKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static StringlinkPreviewImageUrlprivate final static StringlinkUrlprivate final static StringgiphyFallbackPreviewUrl
-
Method Summary
Modifier and Type Method Description final StringgetLinkPreviewImageUrl()final StringgetLinkUrl()final StringgetGiphyFallbackPreviewUrl()final static StringgetDisplayableName(Attachment $self)Generates a displayable name for the attachment. final static BooleanisAnyFileType(Attachment $self)final static BooleanisUploading(Attachment $self)Checks if the attachment is currently being uploaded to the server. final static BooleanisFailed(Attachment $self)Checks if the attachment upload has failed. final static BooleanhasLink(Attachment $self)Checks if the attachment is a link attachment. -
-
Method Detail
-
getLinkPreviewImageUrl
final String getLinkPreviewImageUrl()
-
getLinkUrl
final String getLinkUrl()
-
getGiphyFallbackPreviewUrl
final String getGiphyFallbackPreviewUrl()
-
getDisplayableName
final static String getDisplayableName(Attachment $self)
Generates a displayable name for the attachment. Builds the name using the following priority:
Title of the attachment
Name of the attachment
Name of the uploaded file
Additionally, it removes any time prefix from the name.
-
isAnyFileType
final static Boolean isAnyFileType(Attachment $self)
-
isUploading
final static Boolean isUploading(Attachment $self)
Checks if the attachment is currently being uploaded to the server.
-
isFailed
final static Boolean isFailed(Attachment $self)
Checks if the attachment upload has failed.
-
-
-
-