Multi-account sync with Dropbox API - node.js

I'm trying to create a web app that lets users share files with each other through Dropbox. At the moment, Dropbox handles all the sharing, and there's one central Dropbox account running on the web server that shares the folder with the people who want it.
I'm trying to change it so people don't have to accept a new folder invitation each time. I'd like to have them authorize my app to access an app folder in their Dropbox account, and all their shared folders would go inside there. Any changes they make would get noticed by the app on the server and synced to everyone else's folders.
There's a couple things I'm having trouble figuring out to make this work:
Do I need to make repeated calls to /delta for every account? I can't think how else I'd do this, but that sounds like it would quickly turn into thousands of requests a minute just polling for updates.
When someone adds a file, do I have to upload it once for each account? That seems like a huge waste of bandwidth. I've looked into using /copy_ref, which I think would add a file to another user's account without my app ever touching it, but my app's web interface also allows users to upload files directly to my server, which would then need to be synced with everyone else's folders. That file isn't on Dropbox's servers yet, so /copy_ref obviously wouldn't work.
For a little extra context, my app is written in node.js, and I've been playing with this library to interface with Dropbox, which uses their REST API.

Related

How can I use a website I made, offline and reconnect to local files instead of files on the google drive?

I made a website that links to files loaded on google drive. Its a basic website and you can navigate to different sections and then access pdf files and images that are stored on a google drive. I need to figure out a way to make this be usable offline. I was thinking of just copying the whole website to a thumbdrive. However I dont know a way to make the external google files work offline. Is there a easy way to do this?

Upload folder files and structure to mvc web server

I need to be able to allow users to choose a folder on their computer and upload the whole contents to a web site.
It needs to be cross browser and platform compatible. HTML5 can be required.
I have read a lot about the limitations of the different browsers and that Chrome is the only one that really allows folder uploads.
I can place some requirements on the users, but not a lot.
I have also looked at JSZip and thought about zipping the client folder before uploading, but don't know how to get the selected folder from the user.
I forgot that I had posted this question and asked it differently recently. There was an answer posted. Here is that thread:
Browser Folder Uploading

Create link to open app from mail without making changes in app

I have an app which is already published in app store, I need to send mail to users with link clicking on which it should open the app if its installed or should go to app store. I'm aware of the URL schemes and universal links and that would require modification in my app. I was wondering if there is any other way that this could be achieved where I could create a link maybe using itms-app or some other method where I don't need to make any changes in the app. Any help is appreciated
Unfortunately, not. For a phone to open your application, it needs a way to recognize your application.
URI Schemes
The URI scheme information is configured in the .plist file and is local to the application and therefore cannot be changed without an update. Although you probably don't want to use URI schemes anyways since they will present the user an error if they don't have the app instead of taking them to the app store.
Universal Links
This is the new way Apple performs deep linking and the only other way a link could open up the app. These require a locally stored entitlements file along with an .apple-app-site-association that is hosted on your own website domain and cached when the app is downloaded or updated. These also do not take users to the app store, they take users to the domain in which the AASA file is hosted.
Best Solution
Use Branch's iOS SDK to handle all of the AASA file hosting and App Store redirection. This would still require you to push out a new update, but that is the only possible way to accomplish this.

How to have no down time when uploading new website

I am launching a new redesigned website on windows hosting. I am wondering what is the best way to launch this new website without having any downtime on the existing one?
MY only fear is having a user go to visit a page and it's not there or the supporting files are not uploaded yet.
One of the simplest ways to handle this is to put a load balancer or proxy server in front of the application server. Then set up another application server with the new code. Once it is ready, you can change the proxy server to point to the new application server with the new code. Once you are sure nobody is using the old application server, you can shut it down. This, of course, relies on your ability to get that setup in place. If you are on a budget, you might be able to do it all on a single box. For instance, you could use nginx as a reverse proxy to your application on the same box. Getting that in place could potentially cause a tiny window of downtime - not sure if that's acceptable. Then you might be able to set up the new application on the same box with a different port - again, I'm not sure if that would work for your setup. Anyway, the reverse proxy approach is a pretty common one, and one of the great reasons for deploying to the cloud. You only pay for the short period of time when you need both boxes.
You should make sure that your new website launches all at once and that you set up the proper redirection rules for all previous pages. Once you are launching the new website, pick a time at night where you have low traffic volume, and simply upload all the new code at once to the webserver. This eliminates the fear you have of the "supporting files not uploaded yet". One of the key things to do is make sure all your old pages redirect and map over to new pages on the site just in case anyone clicks into your site using external links.
Two good resources to read:
http://www.rise.net/blog/ideal-way-launch-website-rebrand
http://googlewebmastercentral.blogspot.com/2008/04/best-practices-when-moving-your-site.html
The best methos is to upload the site via FTP, and if you have RD access to login into the Windows server and to copy the new site for a few seconds. In this way you will not have any downtime as when you directly upload the site via FTP.

Using Google Docs from web app

We have a requirement for people to be able to look at documents people have uploaded to us (mainly word, possibly some rtf) via our web app. We want the user to be able to open the docs inside the browser, but keep the original formatting and not have the need for another application (like word, acrobat etc).
We thought about using google docs to do this, there appears to be some batch uploading options to get stuff in there but does anyone know if we can use the API's to keep the user on our site without them having to login to google docs themselves, and keep them still on our website with re-directing to google docs to view them.
Cheers
There's an option to make documents public (Somewhere in Share->Advanced Options).
Using api you can get list of documents in your google docs account, you can even search em. In your app you could make a link to the document in google docs which opens in a new window. That way your user will never navigate away from your page. An alternative would be to use an IFrame, but it's considered bad practice.
A completely different approach could be to automatically generate and host a pdf each time someone uploads a file. There are scripts/programs which can do that, just call them after you receive a file.

Resources