Giter Site home page Giter Site logo

wetransfer-python-sdk's People

Contributors

astrikos avatar infinitefor avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

infinitefor

wetransfer-python-sdk's Issues

Unable to create a new empty transfer

I have a valid API key, however when I try to create an empty transfer I get the following error

>>> T = wt_client.create_transfer()

DEBUG:wetransfer-python-sdk:POST request to <https://dev.wetransfer.com/v1/trans fers> with headers:<{'Content-Length': '23', 'Accept-Encoding': 'gzip, deflate', 'Accept': '/', 'User-Agent': 'WT python SDK v0.2.0', 'Connection': 'keep-aliv e', 'x-api-key': 'EqQpdRGyba5wIqniN29K771troLgjoHn89C4AjHr', 'Content-Type': 'ap plication/json'}> and body:<{"name": "WT Transfer"}>
DEBUG:wetransfer-python-sdk: POST <401> response from <https://dev.wetransfer.co m/v1/transfers> with headers:<{'x-amzn-RequestId': 'a1e1c65e-46d4-11e9-9c0d-01b5 f9dadaff', 'Content-Length': '40', 'Via': '1.1 efdf33ba79ee3aadbfdf7e2b6e838d71. cloudfront.net (CloudFront)', 'X-Cache': 'Error from cloudfront', 'X-Content-Typ e-Options': 'nosniff', 'x-amzn-Remapped-Connection': 'keep-alive', 'Strict-Trans port-Security': 'max-age=31536000; includeSubDomains;', 'x-amz-apigw-id': 'WkHgS E_DDoEFx4w=', 'x-amzn-Remapped-Content-Length': '40', 'Connection': 'keep-alive' , 'X-Amz-Cf-Id': 'Xpw1InyHef0Bsv1aqIv1lPy9I36tut7w_EXFtbXACyJ6M-yKDdqCYQ==', 'x- amzn-Remapped-Date': 'Fri, 15 Mar 2019 03:44:27 GMT', 'Date': 'Fri, 15 Mar 2019 03:44:27 GMT', 'Content-Type': 'application/json'}> and body:<{"error":"Missing Authorization header"}>
ERROR:wetransfer-python-sdk:Failed creating new transfer

Bug in `add_files`

pypi version 0.2.0

In [146]: transfer.add_files(['deduped.pickle', 'merged.pickle'])
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-168-182f4abb61a0> in <module>
----> 1 transfer.add_files(['deduped.pickle', 'merged.pickle'])

~/anaconda3/lib/python3.7/site-packages/wetransfer/transfer.py in add_files(self, file_paths)
    122                 self.transfer_items.append(File(path))
    123 
--> 124         return self.add_items()
    125 
    126     def add_links(self, urls):

TypeError: add_items() missing 1 required positional argument: 'items'

Bug in Transfer.add_links?

Hello,
Using wetransfer-0.0.1, in the implementation of Transfer.add_links it is written:

self.transfer_items.append(File(url))

I guess you would have wanted to write

self.transfer_items.append(Link(url))

instead?

Can't upload files, every upload ends in short link with 0 files

I'm using this code and trying to upload file, but this resulting in WeTrasfer link to empty board - "This board is empty" - no files.

kwargs = {"key":  "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}
wt_client = WTApiClient(**kwargs)

wt_client.authorize()

transfer = wt_client.create_transfer(transfer_name="New upload")
f1 = File("setup-lightshot.exe")
transfer.add_items([f1])

I'm getting this error messages only in debug mode:

ERROR:wetransfer-python-sdk:Failed closing upload for item id: XXXXXXXXXXXXXX
Transfer with id: XXXXXXXXXXXXXXXXXXXXXX, can be found in short url: https://we.tl/XXXXXXXXXXX, with following items: ['Transfer item, file type, with size 2784344, name setup-lightshot.exe, and local path C:\\Users\\XXXXXXXXXXXXXX\\Desktop\\setup-lightshot.exe, has 1 multi parts']
ERROR:wetransfer-python-sdk:Failed to upload item Transfer item, file type, with size 2784344, name setup-lightshot.exe, and local path C:\Users\XXXXXXXXXX\Desktop\setup-lightshot.exe, has 1 multi parts

In normal mode I got only this part:

Transfer with id: XXXXXXXXXXXXXXXXXXXXXX, can be found in short url: https://we.tl/XXXXXXXXXXX, with following items: ['Transfer item, file type, with size 2784344, name setup-lightshot.exe, and local path C:\\Users\\XXXXXXXXXXXXXX\\Desktop\\setup-lightshot.exe, has 1 multi parts']

But link has no files in it.

Send b64 memonry encoded file

I have files stored in a database, well they are not actually on the db, but i have no direct access to the files so i have them in b64, is there any way to transfer them? should i store them in another path in the file system just to send them with add_items?

Modify Transfer/Board name

Hello,
Thank you for your library.
It would be nice to be able to name a transfer/a board differently from "Andreas' very first transfer from python!", which is hardcoded in the CreateTransfer class.
It appears in large print in the board when sharing the transfer.shortened_url:

screenshot from 2018-09-28 16-17-33

Can you modify it? Would you accept a PR?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.