Flutter Web Display Microsoft Documents Firebase - firebase

I am trying to embed MS Documents in a Flutter Web App.
Documents are stored on Firebase Storage. I am using MS Web Viewer to display them in browser.
This works without any problem:
https://view.officeapps.live.com/op/embed.aspx?src=https://file-examples.com/wp-content/uploads/2017/08/file_example_PPT_250kB.ppt
The following two versions where the documents are hosted on Firebase are not working:
https://view.officeapps.live.com/op/embed.aspx?src=https://firebasestorage.googleapis.com/v0/b/tutor-and-learn.appspot.com/o/public%2Ffile_example_PPT_250kB.ppt?alt=media&token=6e293eb9-9f3b-41ab-9969-f936b3c54384
https://view.officeapps.live.com/op/embed.aspx?src=https://storage.googleapis.com/tutor-and-learn.appspot.com/public/file_example_PPT_250kB.ppt?GoogleAccessId=firebase-adminsdk-t47jn%40tutor-and-learn.iam.gserviceaccount.com&Expires=1597309385&Signature=VHbm8U8xlf%2BYybwalAveZtl8FsmEmr6Uml%2BwX%2FR7TOFNqlj%2B8QW1FFSJUNB4qcAzVpEcntLzipT15Zj73B%2FLlSZlQwEU10s5RkJdR5CZeZ6MuF2DUptUbqfnNobdLkizEmwlQ6Bkk4DkDWCd9nRL%2BQ0GLYypBr%2Bxs39bpd8JSuxxACWCjq0Of8qLTBMZQmD%2BgbE8JkMdqvBVOV75A7EQyy1IWqHrRBD7RgVc46IEq4TaO2ZT9h56joJgawqZOt81%2Fkq95YmNWZNOeU9kVRuLpSFsqZru8Ku7aapiFcUXjrjuMWZeC1XCrTK7fwU6A8shNIyHq3bE8RB9a%2BCQnS0llA%3D%3D
Either via Firebase directly nor Google Cloud Storage I get it to work.
The individual links in the above example work without any problems and you can download the file.
https://firebasestorage.googleapis.com/v0/b/tutor-and-learn.appspot.com/o/public%2Ffile_example_PPT_250kB.ppt?alt=media&token=6e293eb9-9f3b-41ab-9969-f936b3c54384
https://storage.googleapis.com/tutor-and-learn.appspot.com/public/file_example_PPT_250kB.ppt?GoogleAccessId=firebase-adminsdk-t47jn%40tutor-and-learn.iam.gserviceaccount.com&Expires=1597309385&Signature=VHbm8U8xlf%2BYybwalAveZtl8FsmEmr6Uml%2BwX%2FR7TOFNqlj%2B8QW1FFSJUNB4qcAzVpEcntLzipT15Zj73B%2FLlSZlQwEU10s5RkJdR5CZeZ6MuF2DUptUbqfnNobdLkizEmwlQ6Bkk4DkDWCd9nRL%2BQ0GLYypBr%2Bxs39bpd8JSuxxACWCjq0Of8qLTBMZQmD%2BgbE8JkMdqvBVOV75A7EQyy1IWqHrRBD7RgVc46IEq4TaO2ZT9h56joJgawqZOt81%2Fkq95YmNWZNOeU9kVRuLpSFsqZru8Ku7aapiFcUXjrjuMWZeC1XCrTK7fwU6A8shNIyHq3bE8RB9a%2BCQnS0llA%3D%3D
I presume the MS Web Viewer can not cope with the URLs. Is there any way I can adapt or change anything in Firebase to get it to work?
Looking in Firebase Storage Console the files are listed with the correct type as application/vnd.ms-powerpoint.

Encode the signed URL before adding it to https://view.officeapps.live.com/op/embed.aspx?src=. You can use online tools to encode URLs like https://www.urlencoder.org/

Related

Mirror Firebase Cloud Storage Directory to a Dropbox Directory

I'm very new to using Firebase Cloud Storage. I'm currently using it to store data generated by some in-house tablet apps. We want users to be able to easily access this data in the form of Dropbox, however don't want to integrate the Dropbox API into our tablet applications as we're already using Firebase for all login management, etc and don't want users to have to login twice.
Is it possible to setup of a mirror between Firebase Cloud Storage and a Dropbox account such that any file added to Firebase Cloud Storage is immediately copied to the Dropbox directory?
You can simply use cloud functions which are being triggered by cloud storage service (it will triggered on any uploading, updating, deleting files or folders) on your firebase project and then write your cloud functions in a way to use dropbox api and then make the same change in the dropbox directory structure.
Cost and performance wise I don't think it would an efficient thing to do, unless it is what really you want.

How can i upload the assets bundle on Firebase server? google provides server to upload asset bundles that can used for android / IOS platform games? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I have generated asset bundle from unity and i am trying to upload it to google server, most probably i am expecting firebase provides such services. I am trying from last two days but i didn't found a solution to upload the asset bundle to firebase server. And also i am not sure that google provides the server services for the android / IOS games where we can upload the asset bundle files. I also need to understand about the mechanism to upload it.
I have tried the amazon server in past, that works perfectly but i am wondering is google also provides such services if it is more likely to be used.
Simple code (standard) was used to download the asset bundle from server.
i want to know the mechanism to upload the asset bundle files from unity on firebase server or google server, and of course i would like to hear the comparison with amazon server.
i would also like to get the percentage of downloaded asset bundle size at download time so that the user can know how much data he has downloaded and how much left.
There's not a complete end-to-end integration in Firebase that I know of for uploading AssetBundles from the editor and pulling them down in the client. There is the Firebase Cloud Storage SDK that you can use. I'll give you a brief overview of how you may use it.
I like to use the AssetBundle Browser to build my bundles:
And, using the Firebase Console on the web, I can upload these files to a Cloud Storage bucket. For most simple games, I simply mirror this directory layout:
Once you have your data uploaded, you can get the URL with the Cloud Storage SDK I mentioned before:
// Create a reference from a Google Cloud Storage URI
Firebase.Storage.StorageReference reference =
storage.GetReferenceFromUrl("gs://bucket/AssetBundles/Android/samplescene.manifest");
// Fetch the download URL
reference.GetDownloadUrlAsync().ContinueWith((Task<Uri> task) => {
if (!task.IsFaulted && !task.IsCanceled) {
Debug.Log("Download URL: " + task.Result());
// ... now download the file via WWW or UnityWebRequest.
}
});
Once you have all the URLs, you can use your favorite method to load them into Unity.
There are of course methods for Cloud Storage to download directly to file if you don't want to use Unity's caching as well as placing them directly into memory.
Now, I mentioned that there isn't any end to end solution to upload your asset bundles to Firebase. There is an Uploading API as well as an Admin SDK if you wanted to build your own pipeline to automate that.
I hope this all helps!

Download File in Appmaker

I have created one app in Appmaker, I want to download certain reports from the Drive tables in Appmaker. For this currently I am creating SpreadSheet using Drive APIs. I want to add download feature as well which allows users to Download Spreadsheet in their local machine.
I have done research on Appscript which allows users to Download files using ContentService, however I do not have any HTMl page from where I can invoke this method. Are there any alternatives for this?
It seems that you can get download URL using DriveApp Apps Script service
// Server script
var downloadUrl = DriveApp.getFileById(FileIdGoesHere).getDownloadUrl();

In Ionic or cordova platform, how to sync and retrieve database from iCloud

I have build an app using ionic framework, and the data uses sqlite database and stores in app /documents folder.
Now I want to know is it possible to sync the database into iCloud, so the user can retrieve the data automatically if they reinstall the app or use a new device.
I did search for some solution, some suggest sync to remote database using such as pouchDB or parse. But as for our company policy, we cannot store app data into any other remote place exclude iCloud.
Any ideas? Thank you so much.
As far as I know, iCloud automatically backs up data on the user's local storage. You don't need to do anything extra.
I might be wrong, but soome people seem to have problems with it doing that
Check out this page
Relevant:
BackupWebStorage(string)
Default: cloud
Allowed values: none, local, cloud.
Set to cloud to allow web storage data to backup via iCloud. Set to local to allow only local backups via iTunes sync. Set to none prevent web storage backups.

How can i sync a picture from my desktop application to my webserver using Firebase?

I will like the following:
1. Is there an API for this?
2. If my app adds a picture, if this firebase is like dropbox (or better) can i read from the virtual folder to display the picture on the web?
Firebase does not have a built-in way to sync filesystems. You could potentially use the Firebase REST API or the Node.js client to push images into Firebase though.
Once your data is in Firebase, it's easy to pull it down into a webpage using the javascript library. I'd recommend storing the image as a base64-encoded string and setting the dataURL on an image to display it.

Resources