Skip to main content
A transaction that appends new file content to the end of an existing file. The contents of the file can be viewed by submitting a FileContentsQuery request. Transaction Signing Requirements
  • The key on the file is required to sign the transaction if different than the client operator account key
Transaction Fees
  • Please see the transaction and query fees table for base transaction fee
  • Please use the Hedera fee estimator to estimate your transaction fee cost
ConstructorDescription
FileAppendTransaction()Initializes the FileAppendTransaction object
The default max transaction fee (1 hbar) is not enough to create a file. Use setMaxTransactionFee()to change the default max transaction fee from 1 hbar to 2 hbars. The default chunk size is 2,048 bytes.

Methods

MethodTypeDescriptionRequirement
setFileId(<fileId>)FileIdThe ID of the file to appendRequired
setContents(<text>)StringThe content in String formatOptional
setContents(<content>)byte [ ]The content in byte formatOptional
setChunkSize(<chunkSize>)intThe chunk sizeOptional
setMaxChunkSize(<maxChunks>)intThe max chunk sizeOptional
setHighVolume(<highVolume>)booleanThe high-volume flagOptional

Get transaction values

MethodTypeDescriptionRequirement
getFileId()FileIdThe file ID in the transactionOptional
getContents()StringThe content in the transactionOptional
This transaction supports high-volume entity creation (HIP-1313). Setting setHighVolume(true) routes the transaction through dedicated high-volume throttle capacity with variable-rate pricing. Always pair this with setMaxTransactionFee() to cap your costs.