Solved

download file in browser.

Posted on 2014-10-11
10
186 Views
Last Modified: 2014-10-18
Hi,

I have a web application in which there is a function to download the file. It behaves differently as per different browser say in in chrome file is downloaded directly,in IE it ask whether to open,save or cancel etc.
We can't change the behaviour as far as browsers are concerned. Can we?

Now if user opens the file in the browser say he is opening in IE,then can user edit the file for example xls/word? Is there any security concern?
0
Comment
Question by:Rocking
  • 4
  • 3
  • 3
10 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40374989
On a normal web site (not Sharepoint), the user may be able to edit the file after it is downloaded... but without an upload page or function, they can not save it back to where they got it.  That applies to all browsers.  Downloading without any other special help is strictly one way, download from the server without any ability to upload it back.
0
 

Author Comment

by:Rocking
ID: 40375012
Is it the restriction of the browser? It means all the files which are opened in the browser are in read only mode and thats how all the browser behaves?

Can you share the link where this information is available?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40375036
No, that's not what I mean.  Browser's only download files and it's been that way from the beginning for 'normal' web sites.  They do not have any access or permission to 'write' files back to a remote server and they never have.

And files like xls and word are not opened by the browser itself but by the programs they designed for like Excel and Word.  The only files that browsers open by themselves are HTML web page files except that Firefox and Chrome now have builtin PDF viewers.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:Rocking
ID: 40375293
so if we open a xls file which is opened in native viewer,can we edit the file which is opened by browser?
Say
1. Is file downloaded into client machine or it is directly opened from server location?
2.If it is opened from local then there is no issue in writing because it is in the hold of the client machine.
3.If it is opened from the remote server directly without downloading from server? If we edit this file then is it saved at remote server location?

Please confirm the three points.
0
 
LVL 25

Expert Comment

by:Mohammed Khawaja
ID: 40375307
If you would like the same functionality in Chrome which you have in IE then download Chrome Extension IE Tab.  You will get the same functionality for saving as well as being able to edit Office documents.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 40375319
In a web browser, files are always downloaded and opened locally.  Even web pages are displayed that way.  For files like 'xls', the browser itself does not open them, it passes them on to the program on your computer that is designated to open them.  The only exception I know of at the moment is PDF files and both Firefox and Chrome now have builtin viewers for those.  (But Not editors)

There are some specialized network setups with Microsoft Sharepoint that are designed to save pages back to the server.  And there are networks where the local computer is used as a display terminal and the files and applications are opened and edited on the server.  But those are not web browser and web server applications.

This page you are looking at is downloaded to my computer and I am editing this text on my computer.  When I click on Submit it sends it back to the server.  But I am not Editing it on the server.
0
 

Author Comment

by:Rocking
ID: 40377408
are there any open source plugin for opening ms office files in browser (chrome,ie,firefox)
0
 
LVL 25

Expert Comment

by:Mohammed Khawaja
ID: 40378005
There are no plugins but you could download LibreOffice which is freeware.
0
 

Author Comment

by:Rocking
ID: 40382614
it can be embedded in internet explorer,chrome and firefox?
0
 
LVL 25

Expert Comment

by:Mohammed Khawaja
ID: 40382700
I don't know of any ways of opening office documents as embedded in browser.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL to update characters in table column 6 146
iterator/ListIterator approach 17 39
eclipse console opening separately 2 29
how to debug htl and js pages 8 38
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question