Upload document on iCloud drive using node JS - node.js

I am working on an application that allows the user to login into an Apple account and access iCloud drive, I am also allowing the user to upload all documents on iCloud drive. Does Apple provide any open API to upload documents on the iCloud drive? Or Any node package which allows uploading the document on the iCloud drive?

I don't think the iCloud drive API is publicly available for developers right now. But instead of it you can use CloudKit API, it allows you to query on your iCloud data. You can use CloudKit provided CloudKit JS library in your Node application.
Go through this documentation:
https://developer.apple.com/documentation/cloudkitjs

Related

Sync for the first time the CloudKit data

My app backup the data to iCloud or sync with user device through the user iCloud account using NSPersistentCloudKitContainer privateDataBase.
The main problem is, when user install the app I need to know if user has data in iCloud or not according this information, I let user to setup account or fetch the existing account, since it takes too long to fetch with local CoreData, I am trying to find a way to fetch directly from iCloud through CloudKit, since I am new in CloudKit, I don't know how to fetch data from CloudKit any help appreciate.

Buildfire: Best way to allow user to upload photos

Is there anything that is built into the Buildfire platform that would easily allow a user from the "Widget" to upload and post photos to the Buildfire server?
I think you are looking for this API.
https://github.com/BuildFire/sdk/wiki/File-System-Services
Then you want to pass your image to the get Server / CDN using
https://github.com/BuildFire/sdk/wiki/How-to-use-ImageLib#buildfireimagelibcropimageurl-options-cdn-mode
Keep in mind usage is limited to your app tier

Can I set my Node.js Backend to access my Google Drive to list/download/upload?

I want my back-end to use the Google Drive API to be able to list/upload/download files from a normal google drive folder (as opposed to a cloud bucket). But not the user's Google Drive, only MY drive.
As far as the end-user is concerned they would just be on my site but when they upload a file, my back-end would receive it and store it on MY google drive. Same for a simple list of files in the folder, I just want them to click my front-end button and have it send a call to my back end, then my back-end sends a call to the google API and returns a list.... effectively making my back-end the middle man for my google Drive. So that my users don't need a google account to access my site
My reasoning is I want my users to NOT need a google account, but I will still need to share these folders with contractors. The contractors can have a google account, that doesn't bother me, And I don't want to have to re-invent the wheel by building a separate front-end for my contractors to download these folders when Google Drive already has perfectly working UI that will zip a folder and download it already built.
So I want:
User -> front-end -> my backend -> google drive
I have seen posts on doing this for other services, like analytics and calendar, but I really need drive capabilities.
A user could be either my client who needs to upload and download OR my client's clients (who will only ever need to upload)
Main Question:
Can I set my NodeJS Back-end to access my Google Drive to list/download/upload
If it is possible:
How, and should I? As I write this, I am thinking of issues... like, will uploading a file from Front-end to back-end then to google drive be too cumbersome to be practical? (These are video files that could be around 300-400mb).
If not possible OR it is too cumbersome:
Can anyone suggest anything that will make access to Google Cloud bucket folders easier? Package? Example? Method? Tutorial?
Frontend: VueJS with axios
Backend: super basic node/express API/back-end on an AWS ec2 server
The short Answer is Yes.
The way to do this is with a service account as these accounts are special credentials to be used by a service. These accounts are of the form: service-account-name#project-id.iam.gserviceaccount.com.
Once you have the service account you will need to grant access to this service account on the Google Drive location. To grant access to this service account share the location (files or folders) with this account, as if you were sharing the files with another user, just by adding the email on the edit permitions.
And Finally to manipulate the files there programatically you can use the NodeJS Client Library which will make the task easier than manipulate the API calls directly.

google admin sdk retrieve chromebook hardware

I need to retrieve hardware specification from all the provisioned Chromebooks and send it to a server.
I tried by developing an extension and deployed it through Google Admin but I will need to specify account id before sending it to the server.
I can create an option pop up for the extension but for accounts that have 1000 Chromebooks, it's not possible to input account id by going through each Chromebooks.
I recently stumbled into google admin SDK but this does not seems to have any way of retrieving Chromebook's hardware specification.
So my questions are:
Can I push a configuration file to all Chromebooks so my extension
can retrieve the account id.
Can I retrieve Chromebook's hardware specification via Google Admin
SDK?

How to upload xlsx files to my own google drive, then convert them to google spreadsheet and get the shareable link programmatically?

I'm working on a node.js server. I want to upload and convert .xlsx files to google spreadsheet in my own google drive and then get the shareable link programmatically.
However, I found google drive api is specialized for building app for other users to access their drives to do something on your app but not for accessing your own drive programmatically. Do I understand this correctly?
I have read a lot of documents on google developers and some tutorial about this but I cannot find the way to what I want. Is there any way to do what I want? Could you give me some guidelines?
You have misunderstood.
Drive uses oauth2 to handle the identification and authorisation of the target Drive account. Specifically, the Access Token "contains" (conceptually, not literally) the Id of the Drive account.
All of the published examples show how to obtain an access token for a third party user because that is the more common and more complex use case. Obtaining an access token for your own account is much easier.
See
How do I authorise an app (web or installed) without user intervention? (canonical ?)

Resources