Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! 2.6/7 » Questions about Stars! AutoHost » file upload without searching for the file
file upload without searching for the file Tue, 04 May 2004 15:04 Go to next message
Beowulf is currently offline Beowulf

 
Crewman 2nd Class
Stars! Nova developer
Stars! Nova developer

Messages: 13
Registered: November 2003
hi.

What I just thought was, that it should be no problem to code something to upload the x-file for a specific game without choosing the file-name explicitely, since it does not change for a while and my file-tree is a bit deeper.

what I thought of is something "easy" like <INPUT TYPE=file NAME=filename SIZE=30 VALUE="D:\Spiele\STARS!\game\GAME.X1"> instead of <INPUT TYPE=file NAME=filename SIZE=30>, so I can just load my privat upload.htm and klick on the "submit your x-file" button, but this does not work of course.

so I thought, before I begin to learn html, cgi, perl and javascript, I wanted to ask if someone already coded such a script / program...

Beowulf.

Report message to a moderator

Re: file upload without searching for the file Tue, 11 May 2004 00:40 Go to previous messageGo to next message
Dogthinkers is currently offline Dogthinkers

 
Commander

Messages: 1316
Registered: August 2003
Location: Hiding from Meklar
hehe, you got pretty close...

edit the html to:

<INPUT TYPE=text NAME=filename VALUE="c:\whateveryouwant" SIZE=30> <BR>

and save it as your own file. This should work.

EDIT: sorry, this doesn't actually work at all. Embarassed


[Updated on: Tue, 11 May 2004 21:53]

Report message to a moderator

Re: file upload without searching for the file Tue, 11 May 2004 01:02 Go to previous messageGo to next message
Dogthinkers is currently offline Dogthinkers

 
Commander

Messages: 1316
Registered: August 2003
Location: Hiding from Meklar
(the key thing there is that it appears that the VALUE=xxx needs to be before the SIZE=xxx parameter. I don't know why, but it appears to work for me. (I can't test properly as I'm not in any live games, but the text appears, and if you put in garage the site tells you the file or password is false)

Report message to a moderator

Re: file upload without searching for the file Tue, 11 May 2004 10:00 Go to previous messageGo to next message
Staz is currently offline Staz

 
Lieutenant

Messages: 514
Registered: November 2003
Location: UK
Dogthinkers wrote on Tue, 11 May 2004 05:40

hehe, you got pretty close...

edit the html to:

<INPUT TYPE=text NAME=filename VALUE="c:\whateveryouwant" SIZE=30> <BR>

and save it as your own file. This should work.


I don't think that is right. You have changed TYPE=file to TYPE=text which means it is no longer a file upload control.


The problem is one of security I think; the standard purposfully states that the server _cannot_ specify what the file is. This prevents naughty servers from uploading (for example) your password database by convincing you to click the button.

See the following FAQ entry...

http://developer.irt.org/script/1154.htm

Report message to a moderator

Re: file upload without searching for the file Tue, 11 May 2004 21:42 Go to previous messageGo to next message
Dogthinkers is currently offline Dogthinkers

 
Commander

Messages: 1316
Registered: August 2003
Location: Hiding from Meklar
hmmm, how odd...

I'd swear that the first time I did it I got an "incorrect password" error (which I epected, as I had to test with a fake file name and password as I don't have any current Stars! games) but now I get "you forgot to enter a filename"

... I must be going crazy Embarassed

Report message to a moderator

Re: file upload without searching for the file Tue, 11 May 2004 21:52 Go to previous messageGo to next message
Dogthinkers is currently offline Dogthinkers

 
Commander

Messages: 1316
Registered: August 2003
Location: Hiding from Meklar
I've had a good read up, and I agree totally. I'm pretty confident it is not possible to set up an html page to work with AH that will choose the file location automatically.

In theory (I'm guessing here) you could probably capture the data that actually gets sent whenever you 'submit' and just resend that data everything you want to submit. But now were getting well beyond the realms of time saving and are entering the murky realms of time wasting Laughing

You could possibly save a second or two each time by just including the complete file path of your .x file wherever you keep the upload password, and just paste it in at the same time... Laughing

Report message to a moderator

Re: file upload without searching for the file Fri, 14 May 2004 09:31 Go to previous messageGo to next message
mazda is currently offline mazda

 
Lieutenant

Messages: 655
Registered: April 2003
Location: Reading, UK
Isn't there a difference between setting the location (i.e. directory) and actual full file name ?
Or is it that you want to totally remove any human interaction ?

I'm not quite sure what you want here.
I only have to click on the upload link, and then double click on the file name (I think). Not too arduous.

Of course it may not work like that if I were in more than one game on AH.

Report message to a moderator

Re: file upload without searching for the file Mon, 17 May 2004 21:29 Go to previous messageGo to next message
Dogthinkers is currently offline Dogthinkers

 
Commander

Messages: 1316
Registered: August 2003
Location: Hiding from Meklar
I'm pretty sure he's talking about a setup with a number of different games in progress.

Of course since all the games are on AH, then they must have different names, in which case you could keep them all in the same folder and save yourself the trouble of navigating between the folders... Laughing

Report message to a moderator

Re: file upload without searching for the file Thu, 27 May 2004 09:18 Go to previous message
Downsider is currently offline Downsider

 
Crewman 1st Class

Messages: 35
Registered: June 2003
Location: Derbyshire, England
Quote:

Of course since all the games are on AH, then they must have different names, in which case you could keep them all in the same folder and save yourself the trouble of navigating between the folders...


Alternatively, you could write a short batch file to copy all *.x* files to a specific directory.
Run this when you've finished your turn(s) and all games can be uploaded from a single folder
I'm not sure if this actually saves time though. I suppose it just depends on how messed up your file system is Very Happy



"Violence is the last resort of the incompetent" - Salvor Hardin

Report message to a moderator

Previous Topic: Autohost is back
Next Topic: Small problem : Cant see game on game page.
Goto Forum:
  


Current Time: Thu Mar 28 15:17:55 EDT 2024