A file attached to a lead, such as a photo, quote or signed document, held by content hash rather than as bytes on the row. As well as the file itself it records who uploaded it, when, any notes about it and, where the uploading device supplied one, the location it was taken from. A lead can have any number of files.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| contentType | String | The media type of the file, such as image/jpeg or application/pdf, used when it is served back to a browser. |
| createdBy | Profile | The profile that uploaded the file. |
| createdDate | Date | When the file was uploaded, as a timestamp. |
| fileHash | String | Content hash of the uploaded file, which is how the bytes are fetched from the content store. The file contents are not stored on this row. |
| geoLocation | String | Where the file was uploaded from, as latitude and longitude separated by a semicolon, for example -36.736407199999995;174.6943164. Only set when the uploading device supplied a location, so it is often null. |
| id | long | The database identifier of this attachment. |
| lead | Lead | The lead this file is attached to. |
| name | String | The file name as uploaded, used when the attachment is displayed or downloaded. Not guaranteed to be unique within the lead. |
| notes | String | Free text the uploader wrote about the file, such as what it shows or why it was added. Null when nothing was written. |
Methods
getId() · getName() · setName(String name) · getFileHash() · setFileHash(String fileHash) · getContentType() · setContentType(String contentType) · getGeoLocation() · setGeoLocation(String geoLocation) · getLead() · setLead(Lead lead) · getNotes() · setNotes(String notes) · getCreatedDate() · setCreatedDate(Date createdDate) · getCreatedBy() · setCreatedBy(Profile createdBy)
getId()
Returns: long
The database identifier of this attachment.
getName()
Returns: String
The file name as uploaded, used when the attachment is displayed or downloaded. Not guaranteed to be unique within the lead.
setName(String name)
Returns: void
Sets the file name.
| Parameter | Description |
|---|---|
name | the file name as uploaded |
getFileHash()
Returns: String
Content hash of the uploaded file, which is how the bytes are fetched from the content store. The file contents are not stored on this row.
setFileHash(String fileHash)
Returns: void
Sets the content hash of the uploaded file.
| Parameter | Description |
|---|---|
fileHash | the file's content hash |
getContentType()
Returns: String
The media type of the file, such as image/jpeg or application/pdf, used when it is served back to a browser.
setContentType(String contentType)
Returns: void
Sets the media type of the file.
| Parameter | Description |
|---|---|
contentType | the file's content type |
getGeoLocation()
Returns: String
Where the file was uploaded from, as latitude and longitude separated by a semicolon, for example -36.736407199999995;174.6943164. Only set when the uploading device supplied a location, so it is often null.
setGeoLocation(String geoLocation)
Returns: void
Sets where the file was uploaded from.
| Parameter | Description |
|---|---|
geoLocation | the location as a semicolon separated latitude and longitude |
getLead()
Returns: Lead
The lead this file is attached to.
setLead(Lead lead)
Returns: void
Sets the lead this file is attached to.
| Parameter | Description |
|---|---|
lead | the lead this attachment belongs to |
getNotes()
Returns: String
Free text the uploader wrote about the file, such as what it shows or why it was added. Null when nothing was written.
setNotes(String notes)
Returns: void
Sets the free text notes about the file.
| Parameter | Description |
|---|---|
notes | the notes on this attachment |
getCreatedDate()
Returns: Date
When the file was uploaded, as a timestamp.
setCreatedDate(Date createdDate)
Returns: void
Sets when the file was uploaded.
| Parameter | Description |
|---|---|
createdDate | the date and time the file was uploaded |
getCreatedBy()
Returns: Profile
The profile that uploaded the file.
setCreatedBy(Profile createdBy)
Returns: void
Sets the profile that uploaded the file.
| Parameter | Description |
|---|---|
createdBy | the uploading profile |