work on send file

This commit is contained in:
2025-08-10 12:46:05 +03:30
parent ec01dfe269
commit 17366f5ea6
5 changed files with 451 additions and 45 deletions
@@ -1,14 +1,44 @@
package org.to.telegramfinalproject.Models;
import java.util.Objects;
public class FileAttachment {
private String fileUrl;
private String fileType;
private String fileUrl;
private String fileType; // IMAGE, VIDEO, AUDIO, FILE, GIF, STICKER
private String fileName;
private Long fileSize;
private String mimeType; // MIME type (example: image/png)
private Integer width;
private Integer height;
private Integer durationSeconds; //time for video and audio
private String thumbnailUrl;
public FileAttachment(String fileUrl,
String fileType,
String fileName,
Long fileSize,
String mimeType,
Integer width,
Integer height,
Integer durationSeconds,
String thumbnailUrl) {
this.fileUrl = fileUrl;
this.fileType = fileType;
this.fileName = fileName;
this.fileSize = fileSize;
this.mimeType = mimeType;
this.width = width;
this.height = height;
this.durationSeconds = durationSeconds;
this.thumbnailUrl = thumbnailUrl;
}
public FileAttachment(String fileUrl, String fileType) {
this.fileUrl = fileUrl;
this.fileType = fileType;
}
// Getters
public String getFileUrl() {
return fileUrl;
}
@@ -16,4 +46,32 @@ public class FileAttachment {
public String getFileType() {
return fileType;
}
public String getFileName() {
return fileName;
}
public Long getFileSize() {
return fileSize;
}
public String getMimeType() {
return mimeType;
}
public Integer getWidth() {
return width;
}
public Integer getHeight() {
return height;
}
public Integer getDurationSeconds() {
return durationSeconds;
}
public String getThumbnailUrl() {
return thumbnailUrl;
}
}