Page 1 of 1

upload files

Posted: Sat Apr 30, 2005 9:39 pm
by Skara
Yeah, I know you can't auto-upload. I'm not a n00b. :P

But I saw where someone said something about this in another thread, and it got me to thinking. Could you not use javascript to check if a file exists? Even barring that, why couldn't you auto-upload a file? What I'm really asking is how does uploading files work? I just don't many ways you could bar auto-upload, so I'm curious. ^_^

Posted: Sat Apr 30, 2005 11:55 pm
by infolock
I'm sorry, but I don't think I know what you are talking about. What is this post in reguards to? What are you talking about auto-upload? Auto-upload to where? and autoupload what? do you have a coding issue, or is this a general inquiry? :?

Posted: Sun May 01, 2005 10:44 am
by Chris Corbyn
Moved to Theory...

Posted: Sun May 01, 2005 10:50 am
by Chris Corbyn
JavaScript can't read files on the local machine. JavaScript is deliberately designed to only allow access the broswer features.

File uploads work like this.

1. You MUST use a file input method in a form.
2. You allow the user to choose the file to upload. The path is stored in memory on the client side.
3. The user clicks submit
4. Binary data is tranferred from the client machine to the server.

There is no way, with a standard web browser alone, to access files automatically and upload them.

If we could access files automatcially on the client side the internet would have taken a lot of stick and we'd all have deleted windows installations or heuristics from the sad few people who like to make other's life a misery.

Is this what you were asking?

Posted: Sun May 01, 2005 6:04 pm
by Skara
ah, ok. thanks. was just curious.