mtasa-blue
mtasa-blue copied to clipboard
a function to abort downloads initiated with downloadFile
Is your feature request related to a problem? Please describe.
Currently, there is no way to stop the download of a file initiated via downloadFile from lua. This can be an issue if downloading large files like IMG containers. Unless you disconnect from server...
Describe the solution you'd like
Add a new function like abortDownload(handler) to be used if download was started manually in lua via downloadFile.
local downloadHandler = downloadFile("foo.bin") -- if it takes too long... abortDownload(downloadHandler)
Describe alternatives you've considered
Disconnect from server or stop resource.
Additional context
No response
Security Policy
- [x] I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.