# change Storage directory for streams

**URL:** https://community.wowza.com/t/change-storage-directory-for-streams/510
**Category:** Wowza Streaming Engine
**Created:** [March 17, 2010, 8:15am UTC](https://community.wowza.com/t/change-storage-directory-for-streams/510 "2010-03-17T08:15:08Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![Mayur\_Bais](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mayur\_Bais](https://community.wowza.com/u/Mayur_Bais)
#### Post date: [March 18, 2010, 6:55am UTC](https://community.wowza.com/t/change-storage-directory-for-streams/510/21 "2010-03-18T06:55:00Z")

</div>

Yes I think there is a problem with slashes? how to solve that.

There must be a way to do this… without making subfolders per client.

How do you guys do integration with s3.

this is very important for us

---

<div class="post-metadata">

### Author: ![Mayur\_Bais](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mayur\_Bais](https://community.wowza.com/u/Mayur_Bais)
#### Post date: [March 18, 2010, 7:08am UTC](https://community.wowza.com/t/change-storage-directory-for-streams/510/22 "2010-03-18T07:08:56Z")

</div>

it gives me this error :

ERROR server comment - MediaReaderFactory: getInstance: Missing definition for c

and runs in an infinite loop

I did this in play method :

params.set(PARAM1, new AMFDataItem(“C:\mnt\sdt-platfs1\images\forums2\FR\0\0\videos\videos\_8dcd5c3c-9dea-43d3-b8e8-2145ee0c37e0.flv”));

---

<div class="post-metadata">

### Author: ![Mayur\_Bais](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mayur\_Bais](https://community.wowza.com/u/Mayur_Bais)
#### Post date: [March 18, 2010, 7:30am UTC](https://community.wowza.com/t/change-storage-directory-for-streams/510/23 "2010-03-18T07:30:52Z")

</div>

1. comment storageDir tag in application.xml

1. onAppConnect do this :

```auto
public void onConnect(IClient client, RequestFunction function,
			AMFDataList params) {
		getLogger().info("onConnect: " + client.getClientId());
		
		client.getAppInstance().setStreamStorageDir("C:\\mnt\\sdt-platfs1\\images\\forums2\\");
		getLogger().info("onConnect: " + client.getClientId());
	}

```

1. and call one function from flex client to set user folder path like this :

```auto
public void setPathValue(IClient client, RequestFunction function, AMFDataList params){
		if (getParam(params, PARAM1).getType() == AMFData.DATA_TYPE_STRING)
			FlvOperator.Path = params.getString(PARAM1);
			System.out.println("path :: " + FlvOperator.Path);
			sendResult(client, params, "path set successfully");
	}

```

1. override play method like this :

```auto
public void play(IClient client, RequestFunction function, AMFDataList params)
	{
		
		if (params.get(PARAM1).getType() == AMFData.DATA_TYPE_STRING)
		{
			String streamName = params.getString(PARAM1);
			System.out.println("com.ness.wms.module.FlvOperator.Path :: " + com.ness.wms.module.FlvOperator.Path);
			
			params.set(PARAM1, new AMFDataItem(com.ness.wms.module.FlvOperator.Path + params.get(PARAM1)));
	}
		com.wowza.wms.module.ModuleCore.play(client, function, params);
	}

```

and it works.

And also if I print value of client.getAppInstance().getStreamStorageDir()

it gives me proper value like “C:\mnt\sdt-platfs1\images\forums2\”

Thanks again for all the help

---

<div class="post-metadata">

### Author: ![Mayur\_Bais](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@Mayur\_Bais](https://community.wowza.com/u/Mayur_Bais)
#### Post date: [March 18, 2010, 7:32am UTC](https://community.wowza.com/t/change-storage-directory-for-streams/510/24 "2010-03-18T07:32:09Z")

</div>

I am still not sure, how we would do if We have our flvs’ on any server and we need our storage directory to look like “http://…/…”

---

<div class="post-metadata">

### Author: ![mac\_dodo](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@mac\_dodo](https://community.wowza.com/u/mac_dodo)
#### Post date: [September 20, 2013, 2:36am UTC](https://community.wowza.com/t/change-storage-directory-for-streams/510/25 "2013-09-20T02:36:59Z")

</div>

> Change Application.xml /StorageDir to the location you want to use.
> 
> ```auto
> <StorageDir>c://mnt/sdt-platfs1/images/forums2/FR/0/0/videos</StorageDir>
> 
> ```
> 
> Richard

Hello, Google brings me here 🙂

Do you have this example for a mac OSX server ?

```auto
<StorageDir>MACHD://library/Movies/flop/</StorageDir>

```

doesn’t work …

thanks !

---

<div class="post-metadata">

### Author: ![mac\_dodo](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@mac\_dodo](https://community.wowza.com/u/mac_dodo)
#### Post date: [September 20, 2013, 4:39am UTC](https://community.wowza.com/t/change-storage-directory-for-streams/510/26 "2013-09-20T04:39:27Z")

</div>

Ok, so symbolic link are working on OSX, where the Aliases are not !

To make a symlink, go to the terminal :

ln -s /target/path /link/path

Doing this allow you to put your video files on another drive easily.

Those threads puts me in the good way, thanks 🙂

[https://www.wowza.com/forums/showthread.php?17995-server-media-from-different-folder](https://www.wowza.com/forums/showthread.php?17995-server-media-from-different-folder)

[http://gigaom.com/2011/04/27/how-to-create-and-use-symlinks-on-a-mac/](http://gigaom.com/2011/04/27/how-to-create-and-use-symlinks-on-a-mac/)

[Previous page](https://community.wowza.com/t/change-storage-directory-for-streams/510.md?page=1)
