WetoDrive started as a way to save WeTransfer links straight into Google Drive. People kept asking for Dropbox too, so I added Dropbox as a second source: pick a folder in your Dropbox, and it is copied into your Drive on the server, with nothing downloaded to your computer.
It turned out to be a small change, because of one decision made early on. Here is how it works, and the Drive and Dropbox details that cost me time.
A source is three questions
The WeTransfer pipeline already did the hard parts: building folders in Drive, streaming big files, tracking progress, enforcing plan limits. What it needed from a source boiled down to three methods:
public function resolvePageUrl ( string $url ) : string ; // what did the user give us? public function listItems ( string $pageUrl ) : array ; // which files, what names, what sizes?…