Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   Binary safe read/write function (https://forums.graalonline.com/forums/showthread.php?t=71625)

Twinny 01-22-2007 03:41 PM

Binary safe read/write function
 
It would be great if you could save files in their correct format. For instance, receiving a .jpg from a website and saving in it's proper form in a script. Could be SaveDataAsFile(str) or similar ^^. Definitely would be good when NPC-Server sockets are released for everyone :D .

[EDIT]: Now that I think about it, is there one already available/ being made for clientrc?

Admins 01-22-2007 09:53 PM

Normally using savestring() should exactly do that

projectigi 01-23-2007 12:03 AM

when i tried something like that with savestring it did save as .txt but not as .png

Admins 01-23-2007 02:05 AM

Hmmm it's only allowing certain file types yes, to prevent people making .bats or .exes or similar

Twinny 01-23-2007 01:36 PM

So what can files be saved as?

Admins 01-23-2007 03:17 PM

txt, rtf, html, xml, nw, gani, cs, gs, arc, dat, hfl
On serverside also gmap

Twinny 01-23-2007 03:34 PM

Thus my original post ^^.

zokemon 01-25-2007 12:08 PM

Why not gmap on the clientside?
You should also allow gupd :)
And maybe ini? :o
(Since it won't harm anything in the serverfiles folder and certainly won't do harm on the server it self)

projectigi 01-27-2007 01:13 PM

that doesnt help for making an upload thing for pngs =/
can you give the npc-serv clientrc? Oo

Twinny 01-27-2007 04:28 PM

Quote:

Originally Posted by projectigi (Post 1270169)
that doesnt help for making an upload thing for pngs =/
can you give the npc-serv clientrc? Oo

Well, I was just thinking of having an option to save a file you receive through a socket but an upload() function could be useful. Make it so you can set appropriate file types and max size. I already have an idea for uploads but it won't be using the Graal client.

Any possible ETA on releasing NPC-Server sockets publically? ^^

p2p_Sir_Link 01-27-2007 09:18 PM

Quote:

Originally Posted by Stefan (Post 1267896)
txt, rtf, html, xml, nw, gani, cs, gs, arc, dat, hfl
On serverside also gmap

Shouldn't mng and png be added as well?

I understand the dangers, but still, this is probably an unneeded limit.

Twinny 01-27-2007 10:06 PM

If savestring() allowed all common filetypes used in Graal, it would be perfect. I definitely won't be using .exe, .bat or .scr at any point but image types would be great.

zokemon 01-28-2007 01:36 AM

Quote:

Originally Posted by projectigi (Post 1270169)
that doesnt help for making an upload thing for pngs =/
can you give the npc-serv clientrc? Oo

Yes it does...
You load the data from the file on the client, trigger it to the server and save it on the server. Just because the ascii data is unledgeable doesn't mean it won't work...

projectigi 01-28-2007 02:09 AM

it doesnt save as .png
so how would it work Oo

Tyhm 01-28-2007 02:41 AM

*shrugs* Binary data can hypothetically be sent as text, as long as the protocol doesn't attempt to automatically parse it at the same time (inserting linebreaks, ignoring invisible characters, etc). But that's neither here nor there - it Can save as .png and Should, but because Scripted RC isn't done yet Stefan hasn't unlocked that yet. So we have to wait an indeterminite span of time. Maybe it'll be out before Graal3D, maybe after, who knows? I doubt even Stefan knows for sure.

Admins 01-28-2007 08:48 PM

I already said in another thread it might be better to use the built-in upload functionality, we just need a way to configure it correctly, right now it is only uploading if you have client-RC open and select a path (and have write rights for the file)

projectigi 01-30-2007 12:16 AM

I don't care what it is if it gives players the ability to upload things


All times are GMT +2. The time now is 07:37 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.