/    Sign up×
Community /Pin to ProfileBookmark

Allow only "save as"

I have an Excel document on my intranet. I want to forbid people from opening the original version of this file. Is there a way I can make a “left click” a save as”? Any better ideas?

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@svidgenDec 16.2009 — If you provide a link to a file, people will be able to download a copy of the file--that's why the link is there to begin with ... am I missing something? What exactly are you trying to prevent?
Copy linkTweet thisAlerts:
@svidgenDec 16.2009 — You're not providing a link that points directly to a file on a shared drive, are you?
Copy linkTweet thisAlerts:
@nscherneckauthorDec 17.2009 — Yes, the file will be on a shared drive and I want to prevent people from editing the original version of it which is why I want to force them to save a copy when they click the link.
Copy linkTweet thisAlerts:
@svidgenDec 17.2009 — You'll need to make the file available via HTTP then. How you go about doing that may depend on the particular web server you're using. A simple way would be copy and link to the document to a folder in the webroot.
Copy linkTweet thisAlerts:
@aj_nscDec 17.2009 — Use PHP. It will send the appropriate headers (content-type: application/force-download; content-disposition: attachment; filename='filename.xls') that will only allow this file to be downloaded and saved to the users computer, not opened by the program that it is associated with.

Google "PHP download class" and it should help you out.

EDIT: I may have misunderstood your problem....but my solution should still help you out!
×

Success!

Help @nscherneck 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.17,
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,
)...