mapbox / mapbox-sdk-js

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

Callback or promise when upload has finished processing #375

Open gabriel-n-carvalho opened 4 years ago

gabriel-n-carvalho commented 4 years ago

I was looking for some kind of callback or promise when the processing is done.

Some info about our project: We are uploading raster tilesets(GeoTIFF files) very often, and the file size can be from a few MBs to some GBs.

andrewharvey commented 4 years ago

The API doesn't provide this, you need to periodically poll the upload status. I'm on the fence if we should do a wrapper around that to provide a callback in the SDK, or just leave it for SDK users to implement.

gabriel-n-carvalho commented 4 years ago

The API doesn't provide this, you need to periodically poll the upload status. I'm on the fence if we should do a wrapper around that to provide a callback in the SDK, or just leave it for SDK users to implement.

Thanks for the quick response @andrewharvey ! Actually monitoring the processing progress is not that important for our project, it's usually very fast. I guess just a callback when the process is 100% complete would help a lot. Anyway, you answered my question. Should I keep this open to see if other people feel the same?

andrewharvey commented 4 years ago

Happy to leave this open as a feature request, so others can weigh in on if it's something that could be added or not.