HTTP file upload without using file input element

76 views
Skip to first unread message

Mohammad Alam

unread,
Sep 3, 2014, 4:26:04 AM9/3/14
to nod...@googlegroups.com
Hi All,

I want to upload a file on HTTP server but have a filepath and does not want to use input file type element.
Does is it possible to upload a file without showing a file selection dialog or without doing drag/drop.

Regards,
Alam

Alex Kocharin

unread,
Sep 3, 2014, 3:48:42 PM9/3/14
to nod...@googlegroups.com
 
No, it's not possible to upload an arbitrary file from your users hard drive without asking them. 
 
It's a shame really. I'm sure maintainers of the wonderful "NSA free backup for everyone" services would've made a great use of it.
 
That said, if you can install your own software on the client-side, it's possible. If you can't do that, maybe some closed-source crap like ActiveX or Flash allows to restyle the dialog, not sure.
 
 
03.09.2014, 23:01, "Mohammad Alam" <mala...@gmail.com>:
--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/15a3a1bc-232d-4c10-8fdc-d57c962156d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryan Schmidt

unread,
Sep 4, 2014, 1:50:32 AM9/4/14
to nod...@googlegroups.com, Mohammad Alam

On Sep 3, 2014, at 3:26 AM, Mohammad Alam wrote:

> I want to upload a file on HTTP server but have a filepath and does not want to use input file type element.
> Does is it possible to upload a file without showing a file selection dialog or without doing drag/drop.

If you're asking whether this is possible in a web browser, then no, access to arbitrary files on the user's machine without the user's input is not a feature of web browsers; it would be a security problem.

I think Java applets are able to do that, however, so if you need that functionality, you could write a Java applet and embed it into your web page. The user will get a prompt asking whether they want to allow Java to access their files.

q2dg2b

unread,
Sep 4, 2014, 8:34:04 PM9/4/14
to nod...@googlegroups.com

If you can install your own software on the client-side, you can use Curl
Reply all
Reply to author
Forward
0 new messages