IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMFileElem

Public Member Functions

void GetUrl (V2TIMValueCallback< V2TIMString > *callback)
 
void DownloadFile (const V2TIMString &path, V2TIMDownloadCallback *callback)
 
 V2TIMFileElem ()
 
 V2TIMFileElem (const V2TIMFileElem &)
 
V2TIMFileElemoperator= (const V2TIMFileElem &)
 
 ~V2TIMFileElem () override
 

Data Fields

V2TIMString path
 
V2TIMString uuid
 
V2TIMString filename
 
uint64_t fileSize
 
V2TIMElemType elemType
 
void * obj_ptr
 

Constructor & Destructor Documentation

◆ V2TIMFileElem() [1/2]

◆ V2TIMFileElem() [2/2]

◆ ~V2TIMFileElem()

~V2TIMFileElem ( )
override

Member Function Documentation

◆ GetUrl()

void GetUrl ( V2TIMValueCallback< V2TIMString > *  callback)

Get the file download URL.

◆ DownloadFile()

void DownloadFile ( const V2TIMString path,
V2TIMDownloadCallback callback 
)

Download a file

The downloadFile API downloads files from the server each time. If cache or storage is required, you can use UUIDs as keys for external storage. The IM SDK does not store resource files.

Parameters
pathFile save path, which must be specified externally

◆ operator=()

V2TIMFileElem& operator= ( const V2TIMFileElem )

Field Documentation

◆ path

Path to the local file sent(valid only for the message sender)

◆ uuid

File ID which is an internal ID and can be used as an external cache key.

◆ filename

V2TIMString filename

File name.

◆ fileSize

uint64_t fileSize

File size.

◆ elemType

V2TIMElemType elemType
inherited

element type

◆ obj_ptr

void* obj_ptr
inherited