Skip to content

Commit

Permalink
updated var file_path to file
Browse files Browse the repository at this point in the history
  • Loading branch information
sakib committed Mar 8, 2021
1 parent 7c7ddf2 commit 57a19c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions UpStorageApiClient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ 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.
"""

headers = self.auth_header

files = {
'file': open(file_path, 'rb')
'file': file
}

data = {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 57a19c0

Please sign in to comment.