/    Sign up×
Community /Pin to ProfileBookmark

Accessing Client Resources !

Hello forum,

I am a embedded developer new to web development. This is my first post here !
I designed a simple website with html and php. Now I will configure it to send some data to client as a file.
There will be an application at client which will transfer this file to other board via UART interface. Now at this point, user has to download the file and use it with the application to get job done.

My question is, Can we invoke client side application (command line executable) to automate it somehow ??
taking permission from user at first time is fine.

I came across ‘ActiveX’ but can’t use it since both server and client are on Linux platform. Any easy way out?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@rh_lloydnorthovJan 02.2013 — Javascript is forbidden from accessing files on the clients (users) machine, and can't execute programs on the client either.
Copy linkTweet thisAlerts:
@shantanuauthorJan 02.2013 — So is there any other way to achieve it ? (in Linux environment). Or can we somehow grant permissions to java scripts to achieve this ?
Copy linkTweet thisAlerts:
@TcobbJan 02.2013 — Maybe I don't understand your precise problem, but you can download files from a server by indirection, they just need to be in a safe javascript format such as a JSON structure or a quoted escaped string that can be parsed.
Copy linkTweet thisAlerts:
@rh_lloydnorthovJan 03.2013 — As I understand it, most, if not all browsers run javascript in a secure sandbox which can only access the DOM of the current web page, or files on the *server* within the web root directory of the website via AJAX calls. There's no way for the javascript engine to interact with files on the client, or run shell commands on the client.

Assuming what you want to do is:

1) download a file to a *client* machine

2) run a shell command on the *client* machine using the copied file

I'd say the best solution is to write a java app which the user downloads to their machine which when run performs the above steps.
×

Success!

Help @shantanu spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...