# Questions about uplink-nodejs

**URL:** <https://forum.storj.io/t/questions-about-uplink-nodejs/18728>\
**Category:** DCS\
**Tags:** uplink-nodejs, uplink\
**Created:** [June 14, 2022, 12:54pm UTC](https://forum.storj.io/t/questions-about-uplink-nodejs/18728 "2022-06-14T12:54:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tylkomat](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tylkomat/32/62_2.png) [@tylkomat](https://forum.storj.io/u/tylkomat)\
**Post date:** [June 14, 2022, 12:54pm UTC](https://forum.storj.io/t/questions-about-uplink-nodejs/18728/1 "2022-06-14T12:54:41Z")

</div>

Is it a problem that uplink-nodejs is not up-to-date with the go version?

How is metadata treated? Does it count towards the file size? Are there limitations the amount of values?

How can I configure that a file should be automatically removed after time x? Is this done with the access grant permission settings `not_after`?

When I derive an encryption key from a main encryption key, can I decrypt the files which have been encrypted with the derived key with my main encryption key? Does deriving always give the same result? Meaning, do I have to store the derived key or can I just derive again every time I need the derived key?

---

<div class="post-metadata">

**Author:** ![littleskunk](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/littleskunk/32/63_2.png) [@littleskunk](https://forum.storj.io/u/littleskunk)\
**Post date:** [June 15, 2022, 3:16pm UTC](https://forum.storj.io/t/questions-about-uplink-nodejs/18728/2 "2022-06-15T15:16:46Z")

</div>

> [@tylkomat](#):
>
> Is it a problem that uplink-nodejs is not up-to-date with the go version?

Yes. I don’t believe the Go version is a big issue but we had some backwards incompatible changes in our implementation. With an old uplink version you can still upload and download files but you wouldn’t be able to access them with a new uplink version or any other tool that is using the new lib. Same the other way around. A file uploaded in the file browser would cause issues in the old uplink version.

I am not sure if we are going to update the nodejs lib. That is maybe a question for @Jacob.

> [@tylkomat](#):
>
> How can I configure that a file should be automatically removed after time x? Is this done with the access grant permission settings `not_after` ?

Any access grant permission would only make the access grant invalid but not the file. You can simply generate a new access grant and download your file again. This can be useful if you want to share a file but you want the link to work only for a few hours.

The command you are looking for would be `uplink cp --expires`. That will upload the pieces to the storage nodes with an expire date. The storage nodes will keep the pieces for a bit longer to avoid audit penalties and than just delete it without any additional command from your side. The satellite will just stop doing anything with that file and run a cleanup job later.

I am not sure if that expire option is available in the nodejs lib. In case it is missing I can’t even promise we are going to add it any time soon. That question would be for @Jacob again.

> [@tylkomat](#):
>
> Does deriving always give the same result?

Yes it does. You only need to remember the root key and can derive an unlimited number of encrption keys from that.

Let me know if you have any follow up question.

---

<div class="post-metadata">

**Author:** ![tylkomat](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tylkomat/32/62_2.png) [@tylkomat](https://forum.storj.io/u/tylkomat)\
**Post date:** [June 15, 2022, 4:04pm UTC](https://forum.storj.io/t/questions-about-uplink-nodejs/18728/3 "2022-06-15T16:04:37Z")

</div>

> [@littleskunk](#):
>
> With an old uplink version you can still upload and download files but you wouldn’t be able to access them with a new uplink version or any other tool that is using the new lib. Same the other way around.

Does that mean the uplink version should never be updated? Otherwise all uploaded files become inaccessible?

> [@littleskunk](#):
>
> I am not sure if that expire option is available in the nodejs lib. In case it is missing I can’t even promise we are going to add it any time soon.

What are my options?

- I could use uplink-cli on the server and stream my data from nodejs through the command line.  
Is this a good idea?
- I found this [Calling Go Functions from Other Languages | by Vladimir Vivien | Learning the Go Programming Language | Medium](https://medium.com/learning-the-go-programming-language/calling-go-functions-from-other-languages-4c7d8bcc69bf), but can’t assess if this is better/different from how uplink-nodejs was created

---

<div class="post-metadata">

**Author:** ![Jacob](https://storj.bcdn.literatehosting.com/letter_avatar/jacob/32/6_449c533f586939b6e5f246632a46421f.png) [@Jacob](https://forum.storj.io/u/Jacob)\
**Post date:** [June 16, 2022, 5:53pm UTC](https://forum.storj.io/t/questions-about-uplink-nodejs/18728/4 "2022-06-16T17:53:23Z")

</div>

Hi @tylkomat, thanks for your questions.

> [@tylkomat](#):
>
> What are my options?

Can you share more about your use case? Anything else you can share will help us guide you on options.

More options that you could consider:

- Running the gateway-st along side your application. Here is one example of how to do it: [Use Storj DCS from Cloud-native Environments Using the Sidecar Pattern](https://www.storj.io/blog/use-storj-dcs-from-cloud-native-environments-using-sidecar-pattern)
- While we don’t have a definitive timeline that we can update the nodejs bindings to the latest uplink we welcome contributions.

---

<div class="post-metadata">

**Author:** ![tylkomat](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/tylkomat/32/62_2.png) [@tylkomat](https://forum.storj.io/u/tylkomat)\
**Post date:** [June 17, 2022, 7:10am UTC](https://forum.storj.io/t/questions-about-uplink-nodejs/18728/5 "2022-06-17T07:10:59Z")

</div>

I’m looking to create something like wetransfer and similar applications.  
Files will be stored only a limited time, so the `--expires` feature is a plus. Otherwise I just need upload and download.

I happy to contribute to the node bindings, but I never created some. I can’t estimate how much effort it would take. Unfortunately there is no documentation in the repo how to do it. Do you have a good resource?

@littleskunk

> [@tylkomat](#):
>
> How is metadata treated? Does it count towards the file size? Are there limitations the amount of values?

> [@tylkomat](#):
>
> > [@littleskunk](#):
> >
> > With an old uplink version you can still upload and download files but you wouldn’t be able to access them with a new uplink version or any other tool that is using the new lib. Same the other way around.
> 
> Does that mean the uplink version should never be updated? Otherwise all uploaded files become inaccessible?
