Solved

download file in browser.

Posted on 2014-10-11
10
185 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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now