# Distribution of shared resources files to clients

**URL:** <https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931>\
**Category:** Ignition\
**Created:** [August 6, 2012, 12:05pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931 "2012-08-06T12:05:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [August 6, 2012, 12:05pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/1 "2012-08-06T12:05:14Z")

</div>

Hi. I have a bunch of read-only resource files that need to be accessible from within python on the client-side.

How can I distribute these files to the clients and where would they be stored? I would like to avoid the use of Windows SMB shares if possible- ideally it would be distributed with the rest of the Java code.

Thanks.  
Simon

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 6, 2012, 12:29pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/2 "2012-08-06T12:29:45Z")

</div>

What about using a web server like IIS or Apache to dish out the files?

---

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [August 6, 2012, 1:16pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/3 "2012-08-06T13:16:48Z")

</div>

I had considered that, but it would require setting something up in python to retrieve and cache the files. I was hoping there was some way I could use Ignition to distribute them.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [August 6, 2012, 1:52pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/4 "2012-08-06T13:52:02Z")

</div>

If you put the files on the Ignition server under:

C:\Program Files\Inductive Automation\Ignition\tomcat\webapps\main

than we will serve it up through the following url:

[ipaddress:8088/main/file.ext](http://ipaddress:8088/main/file.ext)

If you don’t want to go down that route you can make a module in Ignition that exposes a scripting function the client can use.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 6, 2012, 2:16pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/5 "2012-08-06T14:16:39Z")

</div>

> [@systemparadox](#):
>
> I had considered that, but it would require setting something up in python to retrieve and cache the files. I was hoping there was some way I could use Ignition to distribute them.

Were you thinking on embedding the resources into the client?

---

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [August 6, 2012, 2:20pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/6 "2012-08-06T14:20:11Z")

</div>

Yes. I was thinking it might be possible to embed the resources into the jar file or similar. The caveat is that I would imagine they would need unpacking before they can be sanely accessed by the python script code.

---

<div class="post-metadata">

**Author:** ![Duffanator](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/duffanator/32/3560_2.png) [@Duffanator](https://forum.inductiveautomation.com/u/Duffanator)\
**Post date:** [August 6, 2012, 6:57pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/7 "2012-08-06T18:57:08Z")

</div>

[quote]If you put the files on the Ignition server under:

C:\Program Files\Inductive Automation\Ignition\tomcat\webapps\main

than we will serve it up through the following url:

[ipaddress:8088/main/file.ext](http://ipaddress:8088/main/file.ext)

If you don’t want to go down that route you can make a module in Ignition that exposes a scripting function the client can use.[/quote]

Wow… that’s awesome. I’ll definitely put that to good use. Good tip!

---

<div class="post-metadata">

**Author:** ![systemparadox](https://avatars.discourse-cdn.com/v4/letter/s/b5e925/32.png) [@systemparadox](https://forum.inductiveautomation.com/u/systemparadox)\
**Post date:** [August 10, 2012, 12:14pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/8 "2012-08-10T12:14:44Z")

</div>

If I write a module to do this, where should I save the files on the client side?

I’m currently thinking of just using ‘$HOME/.ignition/files/’. Another possibility is the system TEMP directory.

Any thoughts?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [August 10, 2012, 3:31pm UTC](https://forum.inductiveautomation.com/t/distribution-of-shared-resources-files-to-clients/4931/9 "2012-08-10T15:31:21Z")

</div>

If you don’t need the files permanently than I would put them in a temp directory. You can create your own directory in the user’s user directory. I wouldn’t put the files in the .ignition folder since that is our cache.
