Convert test framework to XCTest. Fix style issues
Expose signedPreloadedImage and support non-upload types
url supports accepting preloaded image format