accept file object in the upload method

Accept file object is useful for example when you want to upload a file from a Django upload form.