I am developing a web application in C#.net. I need to edit a file placed on the server in browser it self(Without downloading it on local machine) and when I save that file, the changes should be reflected in file. For this I want to use google API but I don't know how can I use this.
I want to do like below.
When I click on file name, it should open in browser.
When clicked on edit, it open in edit mode in browser using google doc.
When I save that file, the changes should be reflected in my file which is placed on company server.
How can I do all this thing with google doc API?
Install Google Drive on your server.
Edit the file in Google docs, let Google Drive sync it to the local hard drive.
It is not possible for HTTP protocol, because the basics system doesn;t support it. You can open the file but the file will be downloaded to your local machine in then it will open, you have to specify the MIME type in IIS.
You can use two ways to do a similar job done.
1 By Using FTP
2 Customized solution : Make a page put a text field and load the file (.cs) in it and with submit save it to the file back.
You can embed a google doc in Webpages. But the file would be accessed and saved on Google's servers and not your company server:
Wordpress allows you to do it. Potentially you can see if it possible to do it in a similar way:
http://en.support.wordpress.com/google-docs/
I am not sure if Google has an option of accessing docs from servers outside google's domain.
Related
I am using Google drive API in my Asp.net MVC project and I want to get an idea about making a copy of file or Upload a file with Shared Link. So first understand the scenario.
A User generates a public download link of any file and provide it to my website. Any other user should be able to click on the download button. the specific shared file should be add into the user's drive. Not in (Share With Me) but in User's own Drive Storage.
If anyone have a idea to this so please let me know.
There are many ways you could do this but the best way would depend on what access you would have, as in I am assuming the application would be authenticated to upload the user's google drive. One way could be that using the google drive api you could download the file to a directory then perform an upload to the destination then delete the downloaded file. You can check out the documentation developers.google.com/drive/api/v3/manage-uploads
My asp.net web application is some kind of "document managment system" saving files in the file system of the server.
The stored files are shown in an asp:ListView control and are downloadable as HTTP- Download. But I also want to drag&drop them into another browser window to upload the draged file to an cloud storeage like dropbox or google drive oslt.
I did some research and I didn't find any solution for this problem. I don't know if this is even possible. Maybe someone has an idea how this could be done?
I am pretty sure you can't have a web application doing that for you because it involves having your web language interacting with your computer, to move a local file to another window or tab in the browser.
It would be similar to have Javascript accessing your local files without the user "help". That is not allowed.
Rather than doing that, why not connect to Google Drive or Dropbox API and make the upload yourself?
In the piece of code where you trigger the download, you could also trigger an upload to the desired service.
Here are the API Documentation for the mentioned services:
https://www.dropbox.com/developers/documentation/http/documentation#file_requests-create
https://developers.google.com/drive/api/v3/manage-uploads
my project is a finance based website,
now when ever we upload a word,PDF or Excel document the file is Directly saved in sharepoint and a link is provided to user or the the person whom he submits the invoice or application but according to the new requirement we should provide a view button that basically display the content to the file Kinda like opening a word file on Gmail or yahoo..!!,
as far as i know to open them the file must be physically be on the server to be opened by viewer but the file is uploaded in Sharepoint directly as mentioned earlier
and i can't write any code for the file to be downloaded on server or on client machine coz
reason 1: File may be to Large
reason 2: Performance will be reduced
so is there any other way i can open that respective file in a viewer or popup without downloading it on server or on client machine
Please help me on this
Thanks
If I understood your question correctly , you want view the file in browser ?
Use Office Web Apps with SharePoint
Install office webapp
Activate it
I'm trying to write a desktop application using C# which Google Maps API is embedded in. For this purpose, I embedded a web browser in the application and using Maps API. I could use basic functionalities of the Maps API inside the application.
My purpose is to create a KML file on the fly and show it on the maps. The KML files are successfully created from shapefiles using GDAL. I checked their validity by importing them to the maps.google.com. The problem I'm facing is it is not possible to show KML files on local disk using Maps API. There is no way that I could upload those KML files to a public server that Google can reach. I searched on the web and found that geoxml3 could be used for those purpose but I'm not able to handle it. Since Geoxml3 is subject to same cross-domain download restrictions, I get the "Access denied" error when I try to parse the KML file on my local disk. How could I make sure that my KML document is served from the same domain as the containing map page? I'm pretty new to javascript so any help will be appreciated.
If there is another way of achieving what I'm trying to do(like importing the local kml file to Google servers on the fly,etc.), please tell so. Thank you in advance.
Ekin Gedik
The usual answer to cross-domain issues (at least before recent browsers with CORS: Cross-Origin Resource Sharing, which I have seen but not experimented with), is to use a proxy in the same domain as the web-page. I'm not sure how that will work with a local file though.
You should be able to access a local file from an application running on your local machine, but I'm not sure if that would comply with the terms of use other than for development.
Another option would be to pass the kml to geoxml3 as a string and use parseKmlString method. That would avoid the xmlHttpRequest.
How can i search and download local disk files from web?
some codes available for searching local disk files by C#. but not web based....
please help me friends for searching algorithm..
Thanks,
regards,
Raj.
I can suggest you some asp.net web File Browsers, like ckfinder and a source code from codeproject.
http://ckfinder.com/
http://www.codeproject.com/Articles/301328/ASP-NETUser-Control-File-Browser
From the moment you select your file, you can simple click on it to get it, or use a http handler to send it to the client.