Currently the connect-thumbs.js file handles all URL decoding, file downloading and creation, and image processing. While it allows for a different callback method for decoding the URL it doesn't allow someone to modify the downloading and file creation methods.
This proposal will be to allow a developer to modify the various aspects with plugins. An example structure is below. Alternatively, one could use a node plugin instead of creating a file.
/lib/connect-thumbs.js
plugins/base64-url-decode.js : decodes base64-encoded parameter into a URL
plugins/http-file-download.js : downloads file from external website
plugins/filesystem-retriever.js : retrieves file from the file system, instead of a URL
I would imagine that these plugins would need to be passed as parameters to override the various methods but I haven't thought about how to link that part together.