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. ^_^
upload files
Moderator: General Moderators
upload files
Yeah, I know you can't auto-upload. I'm not a n00b. 
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. ^_^
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. ^_^
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
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?
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?