|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0009474||New issues||Multi Theft Auto : San Andreas||public||2016-11-26 10:57||2017-05-18 19:24|
|Summary||0009474: Make a custom downloading system without resource system|
|Description||I want to load scripts dynamically without resource. This means that I don't need to start the resource if I load some scripts and files, just download it|
from other website(like another server to be used to shunt data traffic) then be loaded by other script. The number and size of these files are huge, so it is hard to load them by resource system. Finally I use CEF to download data (with getBrowserSource and XML Http Request). Unfortunately, the speed of downloading in MTA 1.5.3 becomes lower than 1.5.2
|Tags||No tags attached.|
We have a downloadFile function which allows you to download a file on demand. By marking scripts as files you could also download them and loadstring() them. https://wiki.multitheftauto.com/wiki/DownloadFile [^]
Alternatively, would allowing fetchRemote to servers which are accepted by the Client (via the usual browser dialog) be helpful to you here?
>Unfortunately, the speed of downloading in MTA 1.5.3 becomes lower than 1.5.2
That sounds like a bug.
I means that 'downloadFile' can only be used to download files that are marked in the 'meta.xml'. I have thousands of files need to download, so I can't use that at all. In a word, I can't control it conveniently.
'fetchRemote' is a good way to download files,but I can't download files from other servers.
I want to use a way that is simple and controllable.
Maybe I(or We) need a download system like this:
element = createDownloadThread(address,filename)
bool = downloadThreadSetSettings(element,key,value) -- send head
bool = downloadThreadStart(element)
table = downloadThreadGetStatus(element)
include send head
running or yielded
bool = downloadThreadYield(element) --pause
destroyElement(element) --Kill Download Thread
I don't think this can cause bot.
|What about if the server uses fetchRemote (server can request any file) and then passes the files in triggerLatentClientEvent?|
|That will cause server network lag. What I want is download files from other server directly and dynamically.|
>'fetchRemote' is a good way to download files,but I can't download files from other servers.
Yes, we're considering to allow downloading from other servers via fetchRemote if they have been confirmed via the web browser dialog.
Now I think the title may be "improve fetchRemote"
here are the suggestions.
fetchRemote can send http head (Maybe exists but I don't know how to do it)
fetchRemote returns an element so that we can get its state.
fetchRemote can be cancelled when running.
fetchRemote needs more settings to control.
We can store data in a file.
Since many scripts have already been using fetchRemote, new "fetchRemote" should use another name or a library.
Instead of using the CEF whitelist system, we could check for an authorization file in the root directory of the http server.
e.g. http://220.127.116.11/allowmta.txt [^]
|What I want is that If I download a file in MTA, the data can be written in a file directly by settings and I can get states of the process. Like "downloadFile" but "downloadFile" just downloads files included in the resource.|
|this should be resolved because https://bugs.multitheftauto.com/view.php?id=8648 [^] is solved|
|2016-11-26 10:57||thisdp||New Issue|
|2016-11-26 12:59||sbx320||Note Added: 0025438|
|2016-11-26 16:29||thisdp||Note Added: 0025439|
|2016-11-27 22:16||arranTuna||Note Added: 0025444|
|2016-11-28 12:03||thisdp||Note Added: 0025445|
|2016-11-28 14:05||sbx320||Note Added: 0025446|
|2016-11-28 15:16||thisdp||Note Added: 0025447|
|2016-11-30 20:53||ccw||Note Added: 0025449|
|2016-12-01 13:04||thisdp||Note Added: 0025454|
|2017-05-07 05:48||thisdp||Note Added: 0025917|
|2017-05-12 20:26||Jusonex||Status||new => closed|
|2017-05-12 20:26||Jusonex||Resolution||open => fixed|
|2017-05-18 19:24||qaisjp||Relationship added||related to 0008648|
|Copyright © 2000 - 2017 MantisBT Team|