Record Class FileStorage.StagingUploadInfo
java.lang.Object
java.lang.Record
io.leandev.appfuse.file.FileStorage.StagingUploadInfo
- Record Components:
tempId- 暫存檔案 ID(格式:{date}/{uuid})uploadUrl- 上傳 URL(可能是後端 API 或 S3 Presigned URL)filename- 原始檔名contentType- MIME 類型size- 檔案大小
- Enclosing interface:
FileStorage
-
Constructor Summary
ConstructorsConstructorDescriptionStagingUploadInfo(String tempId, String uploadUrl, String filename, String contentType, long size) Creates an instance of aStagingUploadInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.filename()Returns the value of thefilenamerecord component.final inthashCode()Returns a hash code value for this object.boolean判斷是否為外部 URL(如 S3 Presigned URL)longsize()Returns the value of thesizerecord component.tempId()Returns the value of thetempIdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuploadUrlrecord component.
-
Constructor Details
-
StagingUploadInfo
public StagingUploadInfo(String tempId, String uploadUrl, String filename, String contentType, long size) Creates an instance of aStagingUploadInforecord class.- Parameters:
tempId- the value for thetempIdrecord componentuploadUrl- the value for theuploadUrlrecord componentfilename- the value for thefilenamerecord componentcontentType- the value for thecontentTyperecord componentsize- the value for thesizerecord component
-
-
Method Details
-
isExternalUrl
public boolean isExternalUrl()判斷是否為外部 URL(如 S3 Presigned URL)- Returns:
- 若 uploadUrl 以 http 開頭則為 true
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
tempId
-
uploadUrl
-
filename
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
size
-