Question: Can I use NDH for uploading (to S3/Google Drive etc) which support REST/http/https based API? #109
raxitsheth
started this conversation in
General
Replies: 1 comment 1 reply
-
Hello @raxitsheth , NDH do not support upload only downloads, in theory you could do it using by using the body and headers options, but uploading is something that varies in many implementations, for example this would work only for a single request, but if you are using chunk upload or similar wont work, unless you create a NDH instance each time and send the correct headers, query params, etc, but is not ideal i would suggest you just use normal http from nodejs, or even fetch api that is native supported since node v17, since at the end upload is just a regular http request |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
Just new to NDH (less than 24Hrs) and able to successful download files which requires Bearer token, tricky mimetype (using file:callback(name,path,mimeType) and few other stuff.
I am writing kind of pipeline where we need to download file from server1 and upload it to server2 (S3/Google Drive etc). Both server1 and server2 Download/UpLoad/files/directory - Read,Create,Delete,List etc operations are similar to Oauth2/OIDC/Jwt-ish
Question 1:
Just curious Is it possible to upload file using NDH? It looks like mostly Upload is PUT/Post with uploadStrem/File with Payload/data etc. And most of the things seems available with NDH
Has anyone tried? Any obvious point to take care?
BTW: Thanks to Original author for writing such Mature and extended code, Which covers almost all use cases without any extra dependancy
Raxit
Beta Was this translation helpful? Give feedback.
All reactions