get_link() renamed get_upload_link()
This commit is contained in:
parent
3cf4584be0
commit
ec4b16048c
3 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@ This is a work in progress, further functionality coming shortly.
|
||||||
### Upload a file, and get its public link
|
### Upload a file, and get its public link
|
||||||
|
|
||||||
file = m.upload('myfile.doc')
|
file = m.upload('myfile.doc')
|
||||||
m.get_link(file)
|
m.get_upload_link(file)
|
||||||
|
|
||||||
### Download a file from URL or it's ID,key combo
|
### Download a file from URL or it's ID,key combo
|
||||||
m.download('utYjgSTQ','OM4U3V5v_W4N5edSo0wolg1D5H0fwSrLD3oLnLuS9pc')
|
m.download('utYjgSTQ','OM4U3V5v_W4N5edSo0wolg1D5H0fwSrLD3oLnLuS9pc')
|
||||||
|
|
2
mega.py
2
mega.py
|
@ -92,7 +92,7 @@ class Mega(object):
|
||||||
files_dict[file['h']] = self.process_file(file)
|
files_dict[file['h']] = self.process_file(file)
|
||||||
return files_dict
|
return files_dict
|
||||||
|
|
||||||
def get_link(self, file):
|
def get_upload_link(self, file):
|
||||||
'''
|
'''
|
||||||
Get a files public link including decrypted key
|
Get a files public link including decrypted key
|
||||||
Currently only works if passed upload() output
|
Currently only works if passed upload() output
|
||||||
|
|
|
@ -27,7 +27,7 @@ def test():
|
||||||
##get file's public link
|
##get file's public link
|
||||||
#NOTE: currently this only works with upload() file obj, as below
|
#NOTE: currently this only works with upload() file obj, as below
|
||||||
file = m.upload('test.py')
|
file = m.upload('test.py')
|
||||||
print(m.get_link(file))
|
print(m.get_upload_link(file))
|
||||||
|
|
||||||
##trash a file, by id or url
|
##trash a file, by id or url
|
||||||
#print(m.delete('f14U0JhD'))
|
#print(m.delete('f14U0JhD'))
|
||||||
|
|
Loading…
Reference in a new issue