my.getFileInfo
Version requirements: Basic library 1.4.0 or higher version.
Get file information.
Sample Code
copy
my.getFileInfo({
apFilePath:'https://resource/apml953bb093ebd2834530196f50a4413a87.video',
digestAlgorithm:'sha1',
success:(res)=>{
console.log(JSON.stringify(res))
}
})
Parameters
Attributes | Type | Mandatory | Description |
apFilePath | String | Yes | File path |
digestAlgorithm | String | No | Digest algorithm, supporting md5 and sha1, md5 by default |
success | Function | No | Callback function for call success |
fail | Function | No | Callback function for call failure |
complete | Function | No | Callback function for call completion (to be executed for both call success and failure) |
Success Callback Function
The incoming parameter is of the Object type with the following attributes:
Name | Type | Description |
size | Number | File size |
digest | String | Digest result |