Implementing upload from file with API methods.