PDA

View Full Version : Uploading


Rapidwolve
01-26-2007, 03:23 AM
Is there a way to upload files through the client? This would be useful for custom head and body uploads and would save time for staff and players.

I know theres a function for something like it but how does it work? Would it be like:

//#CLIENTSIDE
function initUpload(platform){
if (platform == "win"){
requestfileupload("C:\randomfile.png");
}
}

napo_p2p
01-26-2007, 03:41 AM
I think that is only allowing uploads for people logged into clientrc.

I do not believe there is one for non-staff.

JkWhoSaysNi
01-26-2007, 04:20 AM
this is a guess, but you could join a class to a staff member then call findplayer('StaffAccount').uploadFile();

of course the staff member would have to be logged in.

coreys
01-26-2007, 04:45 AM
this is a guess, but you could join a class to a staff member then call findplayer('StaffAccount').uploadFile();

of course the staff member would have to be logged in.

NPC Server...? Maybe?

Rapidwolve
01-26-2007, 05:31 AM
NPC Server...? Maybe?

The problem is the file has to be sent by the client to the server.

Clientsided File -> Serversided File = true

napo_p2p
01-26-2007, 09:29 AM
this is a guess, but you could join a class to a staff member then call findplayer('StaffAccount').uploadFile();

of course the staff member would have to be logged in.

The staff member will not have the file to be uploaded though.

Plus, something like that has security issues written all over it.

Rapidwolve
01-26-2007, 11:47 PM
Plus, something like that has security issues written all over it.

Hmm, Well what I would do is make it work only for {.png,.gif,.mng} formats and a certain filesize, height, and width.

Crow
01-27-2007, 12:04 AM
Hmm, Well what I would do is make it work only for {.png,.gif,.mng} formats and a certain filesize, height, and width.

Lol, do something like that with gscript...(think about it first before leaving any stupid comments -_- the image is not yet on the server...)

Rapidwolve
01-27-2007, 12:37 AM
What are you talking about x.x, im saying after when it gets uploaded a function checks to see its file extention and dimensions then it gets moved to the heads folder if everything is ok z.z

Chris
01-27-2007, 03:14 AM
Hmm, Well what I would do is make it work only for {.png,.gif,.mng} formats and a certain filesize, height, and width.

Still not enough. A script can't discern porn from legitimate image, among other things.

Rapidwolve
01-27-2007, 04:48 AM
It's exactly like someone sending it in through an email, someone reviews it before it gets to the main folder z.z

zokemon
01-27-2007, 09:11 AM
I have tried to find ways to do this and after researching it, found it is actaully illegal to try and you could get in SERIOUS trouble if you made something like this. There is a reason Stefan didn't add .gif, .png and .mng support to savestring/savelines.

Admins
01-27-2007, 04:46 PM
Currently there is a script command selectFileForUpload() which opens the file-selection dialog and will upload the selected file to the folder you have currently opened with client-RC. To make it work for normal users we would need some way to define where people can upload files somehow.

Rapidwolve
01-27-2007, 05:47 PM
Currently there is a script command selectFileForUpload() which opens the file-selection dialog and will upload the selected file to the folder you have currently opened with client-RC. To make it work for normal users we would need some way to define where people can upload files somehow.

Hmm, maybe make them put it somewhere in a special Graal folder something like: <graaldir>\special\uploads\, and make it save to levels\players\uploads\