Box.com - crawl all files changed since token - box

In box.com, I'm looking to search for a bunch of documents, get a token, then use that token in a later search to get all the new documents. A "detect changes" api. Google drive has something similar I believe.
Does box.com support this? Does it support giving us change deltas for deleted files, updated files, changed permissions/metadata/tags, etc.?

Yes they do support this. Enterprise only Events API we're using it in production and it works great.

Related

How to upload files and attachments to the sobject record using REST API?

Salesforce has two different UIs and in accordance with it, it has the possibility to store attached files differently.
Two files were uploaded via the classic UI and they are marked as 'attachments'. Other files were uploaded through the new UI and they are marked as 'files'.
I want to upload all of these files using REST API. I cannot find the proper documentation. Can somebody help me with this?
That's not 100% true. In SF Classic UI you were able to upload Files too. It's "just" about knowing the right API name of the table and you'll find lots of examples online.
Attachment and Document objects have exactly same API names, you can view their definitions in SOAP API definition or in REST API explorer (there was something which you can still see in screenshot in here, seems to be down now, maybe they're moving it to another area in documentation...)
The Files (incl. "Chatter Files") are stored in ContentDocument and ContentVersion object. The name is unexpected because long time ago SF purchased another company's product and it was called "Salesforce Content". In beginning it was bit of mess, now it's better integrated into whole platform but still some things lurk like File folders can be called Libraries sometimes in documentation but actual API name is ContentWorkspace. The entity relationship diagram can help a bit: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_content.htm
ContentDocument is a header to which many places in SF link (imagine file wasting space on disk only once but being cross-linked from multiple records). It can have at least 1 version and if you need to update the document - you'd upload new version but all links in org wouldn't change, they'd still link to header.
So, how to use it?
REST API guide: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm
or maybe Chatter API guide (you tagged it with chatter so chances are you already use it): https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_files.htm
some of my answers here might help (shameless plug). They're about upload and reading data too and one is even about data loader... but you might experiment with exporting files first, get familiar with structure before you load?
https://stackoverflow.com/a/48668673/313628
https://stackoverflow.com/a/56268939/313628
https://stackoverflow.com/a/60284736/313628

Flutter: Reading and Writing User Visible Files

I am looking for something along the lines of getExternalStorageDirectory that is available in both iOS and android. The purpose of this directory is to save and retrieve .json configuration files that would be later read back by the application. However the normal getApplicationDocumentsDirectory isn't really what I need. The user is likely to want direct access to the saved files to send them to friends, forums, etc.
Workflows might include:
User A emails a config to User B
User uploads a configuration to a forum
User downloads a configuration from a forum
User creates a configuration offline using a json editor
It seems like I must be missing something obvious here as this seems like a common requirement but I have not found a suitable way to do this.
Thanks
Assuming we're speaking of the path_provider plugin, it actually contains a function called getExternalStorageDirectory, though, as the documentation states, iOS prohibits the user from arbitrarily accessing any directory on the device. I would suggest checking for the platform. If on Android, use getExternalStorageDirectory for Android, and if on iOS, use getApplicationDocumentsDirectory and make it visible to the user. More on that here: How to save a text file in external storage in ios using flutter?
Can't think of any other way of achieving this, since iOS is very strict when it comes to file management (or anything else, really).

Which is the best method to get a local file URI and save it online?

I'm working on a web project but the scenario has some restrictions for a specific user case. We have been investigating a web-only solution and a dropbox-like native way to solve this.
The main restriction is that we shouldn't upload local files to a cloud. We can only track local URI's.
The use cases are:
As a developer, I should be able to link the URI of a local file to a webapp. Thus, I can click on a webapp element and the local file should be opened.
As a user, I should be able to add a directory and view the same structure on the webapp (clicking opens the file). The files are not uploaded.
Possible solutions:
We started trying the FileSystem API but when the specs. were fully defined, we figured out that a local sandbox was not enough, and we can't access to the local URI due to security issues.
We are considering a Dropbox-like native app. The Invision Sync App is closer to what we want.
The less optimal solution would be a complete native application.
The question:
Which is the more efficient way to achieve this? Any idea on some native libraries for doing this faster? Any web-only workaround?
Thanks in advance.

Capturing file changes with Google Drive SDK

Honest to say, I haven't been able to deeply look inside the Google Drive API so far but I wonder if the API has support for what I need. I would like to capture changes under a specific folder and notify the users which has access to that folder.
For example, I have a folder named Foo and there are three people who have access to that folder. When Person 1 makes a notable change (uploads a file, changes a file, deletes a file, etc) under that folder, I would like to notify the Person 2 and Person 3.
Please note here that these changes can be done from anywhere, not just
from my client. The person can take the action through the Google Drive web
interface or the user might be syncing his/her computer with the
Google Drive.
The only part I cannot visualize in my head is how to capture the changes under a specific folder.
For the record, I will be using .NET for my client.
What you're looking for is the changes feed in our just-launched Drive SDK v2. However, the changes feed does not yet support retrieving changes for just a specific folder. Instead, it gives all changes to a user's entire Drive. This is a feature request that we're considering implementing, but I don't have a timeline as to when we'll implement this yet.

How do I integrate MS Word into a web page?

I have a section of a web application I’m working on where there are mail merge templates. The documents are word documents. When a user has need to edit the template I’d like them to be able to simply click edit, which would cause word to load with the document loaded. When the user is done, they click save in word and the web page spots the change in the file and pushes this back to the server.
I managed to create a VBScript in a web page that could do all of this, but only when internet explorers security was turned down. The fact that I’m using VBScript to automate is not good as it restricts the browser choice and I’m not happy asking my users to turn their security down.
I don’t want the users to download the file, edit it, save it to their local machine and then upload it back to the server, it’s all very clunky. I also know that there are 3rd party controls that allow editing in a page, but I'd rather avoid them if I can.
Is there an alternative way of approaching this?
You can use Office Open XML to generate the word documents on the Server Side. There is an msdn article, sorry no time to go searching for it, explaining why you should not automate office from web servers using COM/DCOM because of security issues involving shared memory.
you could use google docs API, which is certainly more universal than using proprietary technology that works in one and only browser (IE).
I think you can go for the google docs API. It is more generic solution to go for too.
It is possible, with browser-security caveats, to open Word documents for edit from a browser via an UNC path on an internal network.
The best option currently is to WebDAV enable your website, and use the SharePoint plug-in client-side to open the file in Word over WebDAV.
The SharePoint plug-in for IE gets installed when you install Office. There is also a plug-in for Firefox/ Chrome referred to as NPAPI. Beware NPAPI seems to have an issue with long URL paths.
IT Hit make a terrific framework for WebDAV enabling a .NET-based website, see http://www.webdavsystem.com/. They also sell a client-side library that can open Word documents via Java instead of the plug-ins mentioned above. IIS has it own, more basic, WebDAV capability that you can use too.
I am not familiar with non-.Net / Apache solutions but just search for WebDAV products.
Office will require the use of HTTPS for editing via WebDAV.