diff --git a/UpStorageApiClient/api.py b/UpStorageApiClient/api.py index a8c7613..ac79bf5 100644 --- a/UpStorageApiClient/api.py +++ b/UpStorageApiClient/api.py @@ -17,10 +17,10 @@ def __init__(self, auth_token, api_key): 'x-api-key': str(self.api_key) } - def upload(self, file_path, is_private=False): + def upload(self, file, is_private=False): """ Uploads File To UpStorage Server Using Their Api. - :param file_path: path of the file that you want to send + :param file: file that you want to send :param is_private: Value of File Model of Upstorage [private, public] (default: False) :return: This Will Return The Url Of The File. """ @@ -28,7 +28,7 @@ def upload(self, file_path, is_private=False): headers = self.auth_header files = { - 'file': open(file_path, 'rb') + 'file': file } data = { diff --git a/setup.py b/setup.py index 8131ea4..75bfdf2 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ def read_file(filename): install_requires=['requests'], keywords=['python', 'storage', 'api', 'upstorage', 'UpStorageApiClient'], classifiers=[ - "Development Status :: 1 - Planning", + "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Operating System :: Unix",