arkaitzgarro / wetransfer-php-sdk

A PHP SDK for WeTransfer's Public API
MIT License
13 stars 9 forks source link

Undefined index: multipart_upload_id #11

Open didymus13 opened 4 years ago

didymus13 commented 4 years ago

Hi,

Looks like ['meta' => [ 'multipart_upload_id' ] ] is no longer being returned from the wetransfer api so Entity/File->getMultipartId() breaks. (Which is being called in File::upload($file, $res) amongst other places.) I'm thinking that the API response has changed, is there a workaround?

Response from Files::addFiles() :

$response = Api::request('POST', "/transfers/{$transferId}/items", ['items' => self::normalizeFutureFiles($files)]);
dd($response);
array:1 [▼
  0 => array:13 [▼
    "id" => "sq47hbnm6sumhhb9a20191220132232"
    "content_identifier" => "file"
    "local_identifier" => "4e7e90df-98be-4548-ac5b-677423b446d9"
    "meta" => array:1 [▼
      "multipart_parts" => 1
    ]
    "tile_width" => null
    "tile_height" => null
    "item_order" => 0
    "name" => "dummy.pdf"
    "size" => 13264
    "mime_type" => null
    "upload_url" => "https://wetransfer-eu-prod-spaceship.s3.eu-west-1.amazonaws.com/redacted ▶"
    "upload_id" => "redacted"
    "upload_expires_at" => 1576855352
  ]
]
stechnique commented 4 years ago

I concur, this connector no longer works. It uses WeTransfer API v1 and I haven't seen an official deprecation notice, but it stopped working about a month ago.

stechnique commented 4 years ago

Seems wetransfer broke it and then pulled the plug: https://wetransfer.zendesk.com/hc/en-us/articles/360038551772-We-ve-retired-our-Public-API