mapbox / mapbox-sdk-js

A JavaScript client to Mapbox services, supporting Node, browsers, and React Native
Other
719 stars 186 forks source link

Create tileset source throws error in v0.16 #486

Open MatejSkrbis opened 5 months ago

MatejSkrbis commented 5 months ago

I tried upgrading the library from v0.13.4 to v0.16.0

When calling this code to create a tileset source in v0.13.4 it works, but in v0.16.0 it throws an error:

const tileSourceResponse = await this.tilesets.createTilesetSource({
    id: sourceId,
    file: `./${id}.ldgeojson`
}).send();

Error is: No file data in request. Expected 1 file named \"file\".

angelmunozs commented 5 months ago

That's right, the same is happening to me and I think it's due to the changes introduced in version 0.15.4. The Mapbox API is responding with a 400 Bad Request.

I have downgraded to 0.15.3 for now until it's fixed...