Added groundwork for UPLOAD, but it does not work quite yet.