my.getFileInfo retrieves information about a file, including its size and an optional digest (hash) for verification.
my.getFileInfo({
apFilePath: 'https://resource/apm1953bb093ebd2834530196f50a4413a87.video',
digestAlgorithm: 'sha1',
success: (res) => {
console.log(JSON.stringify(res));
}
});
| Property | Type | Required | Description |
|---|---|---|---|
apFilePath | String | Yes | File path. |
digestAlgorithm | String | No | Digest algorithm, supporting md5 and sha1, md5 by default. |
success | Function | No | Callback function upon call success. |
fail | Function | No | Callback function upon call failure. |
complete | Function | No | Callback function upon call completion (to be executed upon either call success or failure). |
The incoming parameter is of the Object type with the following attributes:
| Property | Type | Description |
|---|---|---|
size | Number | File size. |
digest | String | Digest result. |
md5 and sha1 digest algorithmsmd5 if not specified