View Issue Details

IDProjectCategoryView StatusLast Update
0009474New issuesMulti Theft Auto : San Andreaspublic2017-05-18 19:24
ReporterthisdpAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Summary0009474: 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

TagsNo tags attached.

Relationships

related to 0008648 resolvedJusonex Multi Theft Auto : San Andreas [Request] Allow clientside fetchRemote to access other servers 

Activities

sbx320

2016-11-26 12:59

administrator   ~~0025438

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.

thisdp

2016-11-26 16:29

viewer   ~~0025439

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.

and

'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
key value
"Range" "bytes=0-200"
... ...
bool = downloadThreadStart(element)
table = downloadThreadGetStatus(element)
include send head
downloaded size
running or yielded
bool = downloadThreadYield(element) --pause
destroyElement(element) --Kill Download Thread

...

I don't think this can cause bot.

arranTuna

2016-11-27 22:16

manager   ~~0025444

What about if the server uses fetchRemote (server can request any file) and then passes the files in triggerLatentClientEvent?

thisdp

2016-11-28 12:03

viewer   ~~0025445

That will cause server network lag. What I want is download files from other server directly and dynamically.

sbx320

2016-11-28 14:05

administrator   ~~0025446

'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.

thisdp

2016-11-28 15:16

viewer   ~~0025447

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.

ccw

2016-11-30 20:53

administrator   ~~0025449

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://1.2.3.4/allowmta.txt

thisdp

2016-12-01 13:04

viewer   ~~0025454

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.

thisdp

2017-05-07 05:48

viewer   ~~0025917

this should be resolved because https://bugs.multitheftauto.com/view.php?id=8648 is solved

Issue History

Date Modified Username Field Change