# Shared component with external file

**URL:** <https://forum.knime.com/t/shared-component-with-external-file/23866>\
**Category:** KNIME Analytics Platform\
**Created:** [May 18, 2020, 4:34pm UTC](https://forum.knime.com/t/shared-component-with-external-file/23866 "2020-05-18T16:34:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptrwlr](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@ptrwlr](https://forum.knime.com/u/ptrwlr)\
**Post date:** [May 18, 2020, 4:34pm UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/1 "2020-05-18T16:34:14Z")

</div>

Hi community,

how can I save an external file in a shared component (not workflow) so that teh file is always available for every user when using this shared component?

Thx.

---

<div class="post-metadata">

**Author:** ![AnotherFraudUser](https://forum-cdn.knime.com/user_avatar/forum.knime.com/anotherfrauduser/32/16912_2.png) [@AnotherFraudUser](https://forum.knime.com/u/AnotherFraudUser)\
**Post date:** [May 19, 2020, 8:26pm UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/2 "2020-05-19T20:26:07Z")

</div>

Hi @ptrwlr,

what kind of external file you want to add to the component?  
I think you would need to add this file to a common accessable location for it to be availible in the component (teamspace/shareddrive/knimeserver)  
Else the easiest solution would be to add a file to the workflow folder (which you do not seem to want… any reason for that?)

---

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alexanderfillbrunn/32/357_2.png) [@AlexanderFillbrunn](https://forum.knime.com/u/AlexanderFillbrunn)\
**Post date:** [May 20, 2020, 8:36am UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/3 "2020-05-20T08:36:16Z")

</div>

Hi @ptrwlr,  
If the file is text based, you can also put the content in a [Table Creator](https://kni.me/n/GRcZcBmlgMJ0lCBx) node and process it from there. Could that work?  
Kind regards,  
Alexander

---

<div class="post-metadata">

**Author:** ![ptrwlr](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@ptrwlr](https://forum.knime.com/u/ptrwlr)\
**Post date:** [May 20, 2020, 10:13am UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/4 "2020-05-20T10:13:30Z")

</div>

Hi,

it’s a .js file.  
The trick with the Table Creator works.

I would still like to add the file to the component.  
If I put the file in the folder of the component, it will not be found when sharing the component to server.

---

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alexanderfillbrunn/32/357_2.png) [@AlexanderFillbrunn](https://forum.knime.com/u/AlexanderFillbrunn)\
**Post date:** [May 20, 2020, 10:25am UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/5 "2020-05-20T10:25:16Z")

</div>

Hi,  
Currently that is not possible, but I agree that it would be useful! I will create a ticket internally.  
Kind regards,  
Alexander

---

<div class="post-metadata">

**Author:** ![ptrwlr](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@ptrwlr](https://forum.knime.com/u/ptrwlr)\
**Post date:** [May 20, 2020, 12:17pm UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/6 "2020-05-20T12:17:22Z")

</div>

Hi @AlexanderFillbrunn

thank you.

BR Patrick

---

<div class="post-metadata">

**Author:** ![AlexanderFillbrunn](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alexanderfillbrunn/32/357_2.png) [@AlexanderFillbrunn](https://forum.knime.com/u/AlexanderFillbrunn)\
**Post date:** [May 20, 2020, 12:44pm UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/7 "2020-05-20T12:44:31Z")

</div>

Hi @ptrwlr,  
As I was just told by a colleague, it is possible after all. You can use knime://knime.node URLs to reference the folder of the current node. If you add a file to your component, using such a URL you are able to read it. Everyday I learn something new about KNIME 🙂  
Kind regards,  
Alexander

Edit: It seems like while this works for components, all data is removed from the component folder when you share it. So for your use case it might not be good enough ☹  
Another edit: We do have another ticket already and it is in the backlog. So maybe the feature will be here soon for shared components.

---

<div class="post-metadata">

**Author:** ![ptrwlr](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@ptrwlr](https://forum.knime.com/u/ptrwlr)\
**Post date:** [May 20, 2020, 6:02pm UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/8 "2020-05-20T18:02:09Z")

</div>

Hi @AlexanderFillbrunn

thank you so much.  
I’m already looking forward to the new feature.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [May 27, 2020, 6:17pm UTC](https://forum.knime.com/t/shared-component-with-external-file/23866/9 "2020-05-27T18:17:31Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
