If you go and open this link, you will see a doc word file rendered in the page.
https://docs.google.com/viewerng/viewer?url=http://writing.engr.psu.edu/workbooks/formal_report_template.doc
Now how can I pass my own files in url to open them using google docs viewer?
Path could be something like :
\\SERVER_IP\My_Archive\2017\03\06\Test.docx
or
C:\inetpub\wwwroot\TestProject\UploadedFiles\Test.docx
The google viewer cannot access files on your local PC. It can open a document published anywhere in the Internet, where Google viewer can access it. You can upload your local file for example to google drive and use the google drive link after that.
Related
I am currently working with a Jupyter file on google colab with 5000 images and several csv files. I wish to find a way to download these data into the colab from a shareable link from google drive without mount to drive, which is: I upload these data into drive first and make them "anyone can view with link", and then I wish to find a way to download these data into colab with this link (So that others can simply run my code without authorization or mount to drive)
Is there any way I can achieve this? Thank you!
You can use gdown.
For example, an image url
https://drive.google.com/file/d/1ztBz3C_2BlXgNGK2mbarGnVqoI287_XT/view?usp=sharing
It's id = 1ztBz3C_2BlXgNGK2mbarGnVqoI287_XT
So, you can download it with
!gdown --id 1ztBz3C_2BlXgNGK2mbarGnVqoI287_XT
you can use !wget in colab to download .csv file in your runtime storage
For Example
this is public link for google sheet
https://docs.google.com/spreadsheets/d/FILE_ID/edit?usp=sharing
we need to get download url for this google sheet file
follow link to get download link
Creating a link to download whole spreadsheet from Google Drive
now we got download url in this form
https://docs.google.com/spreadsheets/d/FILE_ID/export?
type this code in colab
!wget https://docs.google.com/spreadsheets/d/FILE_ID/export?
file will be downloaded like this
snap shot from colab
rename file as your choice
rename snapshot
finally import it using
df = pd.read_csv("/content/file.csv")
I am trying to upload the html file and aspx file in teams. once it is loaded then get the copy of files address
and i am going to load that copied path url in browser but it is not showing web content which i design like web page.
in browser (html/aspx) files are downloading. If i am trying to load apsx file in browser it was showing like error(Something went wrong File Not Found),
so want i like is that is there any feature to load in browser?
Thanks for your detailed explanation.
First of all, Teams does not host any html or aspx file itself. So you can not upload a file and use the URL to render web page in browser. The file URL is a link to that uploaded file location. That's the reason the file is getting downloaded in browser.
Secondly, it is other way round. You can run your website in any other server and use that URL to configure a tab in MS Teams.
Please go through these links
What can Teams apps do?
How do tabs work?
I downloaded a Unity project that use images stored in Firebase server using the following link:
https://zplayer360-86b30.firebaseapp.com
Now I want to reproduce this with my own file. I created a Firebase project using Firebase Console, uploaded manually the images, but now I click "copy folder url" button and it provide me only this link:
gs://insidehome-29c9e.appspot.com/
I need a free HTTP public link.
How can I obtain this?
When you upload a file to Firebase Storage, it automatically gets:
a Google Storage URL (starting with gs://), which you can use to access the file through the Firebase Storage SDK and the Google Storage API.
a download URL (starting with https://), which is a publicly-readable-but-non-guessable URL that you can use to download the URL with regular HTTP clients
What you're looking for is the second URL, which you can find in the Firebase Storage console when you select a file:
At the bottom right you can see the download URLs for the file. One of these is auto-created when you upload the file, but you can create more of them or revoke existing ones.
I am not entirely sure what you mean by "free" URL. The link is publicly readable, but downloads will count against your Firebase Storage download quota of course.
If there are no rules on Firebase storage. You are not protected.
Then it's publicly-readable-and-guessable, One can convert gs:// URL to https:// to download any file without Google SDK's.
https://firebasestorage.googleapis.com/v0/b/[projectID].appspot.com/o/[folderName]%2F[fileName]
Google Storage URL
gs://invitepeople-5d38c.appspot.com/profilePhotos/profile_1.jpg
Https downloadable URL
https://firebasestorage.googleapis.com/v0/b/invitepeople-5d38c.appspot.com/o/profilePhotos%2Fprofile_1.jpg?alt=media
Don't guess profile_2.jpg :)
I am trying to integrate Google-docs UI with ASP.NET Web application.
In this files are stored on our file storage and We want to open Google Docs Editor to edit the word/excel/PPT files.
As a part of POC for this requirement, I am doing below:
Uploading file into Google Drive using below code:
Dim objInsert As Google.Apis.Drive.v2.FilesResource.InsertMediaUpload = objDriveService.Files.Insert(objFile, objStream, sMimeType)
objInsert.Convert = True
objInsert.Upload()
Getting response after upload and using objFile.AlternateLink
property to open the Editor to edit file.
I am facing the issue to download the file when I am using
objInsert.Convert = True. when I am making the call to File object
my Download URL (objFile.DownloadUrl) is not returning it is set
with Null. If I don't use the objInsert.Convert = True then I
am getting Download URL but problem is then AlternateLink open the
file in View mode with various option, I want the URL to open it
directly in editor.
Please suggest what am I missing here.
UPDATE: this was already asked here: DownloadUrl missing from metadata for file on Google Drive API
I think it is the expected behaviour. You can't directly download a Google file type, you have to export it to some compatible format.
I am working on a download management system in asp.net and I can upload and download a docx file. I want to view the uploaded file. I tried using google API but looks like I have to upload the file in google drive itself in order to be able to view it from google drive. I don't want to upload the file in google drive. Is there any other API that helps me to just view the uploaded docx file?
It would be even better if it can be viewed as well!
Use an iframe to embed File.embedLink, documented on
https://developers.google.com/drive/v2/reference/files#resource
I assume you know how to upload files in ASP.net
Using Office Web Apps you can achieve that, provide like of your uploaded document on your site, when the user clicks it will open in the browser it self Link, Read the documentation
Here is the link for API Site