Jump to content

FetchRemote


Best-Killer

Recommended Posts

hello guys please an example of FetchRemote Client Side please (images remote ) 

i tried with that but it's not work 

   addEventHandler("onClientResourceStart", resourceRoot, function()
   local f = fetchRemote("https://www.countries-ofthe-world.com/flags-normal/flag-of-Germany.png", function(data, err)
    if(err == 0) then
	local f = fileCreate(v[3])
	fileWrite(f, data)
	fileClose(f)
	outputChatBox("Passed")
	else
	outputChatBox("error")
	end
	end, "", false)
	end)

 

Link to comment
  • Moderators

Why don't you use both sides?

Request clientside > trigger > serveride download > trigger > clientside write file.

Else you can better use the downloadFile function.

downloadFile

 

Edited by IIYAMA
  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...