How to send files to the server? I've tried many different methods that worked before. How to do it now? I send the file to the server, and it just does not appear, although sv_allowupload 1 and sv_allowdownload
You can't really.
lol why
This can be done by Lua but it's limited: You can save file only in data folder and only .txt or .dat files. You can avoid a restriction by making a module but it's dangerous.
Use file.Read to read the contents of the target file. Use net. library to send contents to server and receive contents on the server. Use file.Write to write a .txt file containing the contents of the file you wanted to upload. Do whatever else you want with that .txt file afterwards.
Why would you need to?
there is like one use case of grabbing cheat source files when my anti-cheat fires off so that i can inspect those are laugh at how idiotic some cheaters are
to use my files on the server
you can probably do this if you make a module that supports all of the file transferring shenanigans
wait, do you mean just putting addons/config files or whatever in the server files?
previously, you could send txt, dat, bsp, etc files to the server to use them, and now rubat has blocked this for some reason
Every ½ year, there is an exploit with source and sv_allowupload. The safest way to run a server is to disable it and use FTP or some other software to transfer files.
(Since you're posting in /Developers/, but I doubt it) There are a few ingame IDE's that you can use, if you're developing scripts or addonslive.
You could read the file split each line into a table and send it via networking
Perhaps if you explain what you want to do accomplish by sending the files to the server in this fashion it would be easier for someone to point you in the right direction for an alternative method.
Don't
Why not? I guess it should work with .txt files and such.
It would work with any file type. as even images are made out of special characthers
I guess so, I said .txt because I didn't think you could send such a long message. The max you can write at once is 65533 characters which is 65533*8 + 8 bits, meaning that every message can write up to 65KB, so a small picture.
util.Compress. profit
Confession : Instead of pushing a big ass table (that was too big in fact for the net lib), i turned it into json and compressed it before sending it over the network
lol, forum people, consisting of those who always assents with rubat, ahahaha
I guess what you need is to upload files from your computer to your server (Probably from a server provider because why would you go through all this hoops if you had the server on your computer?) so you can update it, restart and then have it ready.
But why would you? Don't most server hosts offer something like that already?
Yeah, let's allow normal file upload! That way ANY workshop addon creator can make an addon that uploads malicous files to the server! How fun, right???
Would a normal addon be able to run a program? If the server owner doesn't check what he's putting in his server then it's his fault, you don't need to upload file to do damage because any good old backdoor is gonna be equally as damaging.
#RemoveIncompetentOwners
you would only have a few gmod servers left out of all
Sorry, you need to Log In to post a reply to this thread.