Autodesk-Forge / forge-api-nodejs-client

Forge Node.js SDK: Provides Node.js SDK to help you easily integrate Forge REST APIs into the application
Apache License 2.0
121 stars 87 forks source link

Planning for Direct-to-S3 approach #80

Closed amkoehler closed 2 years ago

amkoehler commented 2 years ago

Hello - recently it was announced that certain data management API calls would be deprecated in favor of direct uploads and downloads from the underlying AWS S3 bucket. We make use of a couple of methods in the ObjectsApi and I'm wondering if we'll need to plan for these changes or if this package will be handling that automatically.

For example, we use ObjectsApi.uploadChunk for resumable uploads, which calls this soon-to-be-deprecated method. Will uploadChunk be updated under the hood to call the new direct-to-s3 endpoint?

sivanandh commented 2 years ago

When we use this sample code to upload a file we are facing the issue that singedurl is not generating with the upload key.

when we try 3 or 4 times the same code is generating the correct upload key with singedurl however its failing for 8 out of 10 times upload_key_issue

darkl1ght commented 2 years ago

@augustogoncalves

Hi, any updates on whether the ObjectsApi's methods getObjects() and uploadObject(), be internally updated and those using forge-apis npm package won't have to modify their code? This is with respect to the deprecation mail that was sent out in favor of a new set of Data Management API endpoints to allow direct upload and download from the underlying AWS S3 bucket.

Hello - recently it was announced that certain data management API calls would be deprecated in favor of direct uploads and downloads from the underlying AWS S3 bucket. We make use of a couple of methods in the ObjectsApi and I'm wondering if we'll need to plan for these changes or if this package will be handling that automatically.

For example, we use ObjectsApi.uploadChunk for resumable uploads, which calls this soon-to-be-deprecated method. Will uploadChunk be updated under the hood to call the new direct-to-s3 endpoint?

cyrillef commented 2 years ago

v0.9.1 implements the wrapper for directs3. it also introduces 2 generic methods to hide the complexity of using s3. They are called downloadResources() and uploadResources(), see samples/dmSample2.js and dmSample-complex.js for examples.

amkoehler commented 1 year ago

Hey @cyrillef - I'm only a year late on responding! We're still on v0.8.4 but looks like upgrading to 0.9.x will resolve this as you said. I like the convenience of uploadResources, but if we're already using uploadChunk is there a compelling reason to migrate to `uploadResources?

cyrillef commented 11 months ago

Hi, no reason to move to this function if you already using chunks.

amkoehler commented 11 months ago

Thanks @cyrillef. This has me a little confused on the deprecation. Under the hood, uploadChunks calls a deprecated endpoint:

https://github.com/Autodesk-Forge/forge-api-nodejs-client/blob/48e79706b659552f75c8099c5e2131b68153df81/src/api/ObjectsApi.js#L184-L190

I opened #106 for a separate issue with uploadResources, so for now we're still on uploadChunks. Is there truly no reason to move if uploadChunks is calling a deprecated endpoint?