Skip to main content
added 24 characters in body
Source Link
Will Price
  • 16.4k
  • 1
  • 21
  • 61

Vinoth, it would help if you could explain also why exactly you have this requirement - as it seems a little bit strange, what is wrong with the mobile publication having its own binaries?

Firstly, if you are publishing from 2 publications to the same target folder, you need to be very careful that the binaries you publish have unique filenames, otherwise binaries could be overwritten or even removed in an unwanted manner. Chris Summers has a good blogpost explaining how to ensure this here

Presumably this is not behaviour that you want for all binaries in the mobile publication (otherwise you could just set the multimedia path and url for this publication to be the same as for the web publication and you are done - as Nicks answer shows), so there is some characteristic of the binary which determines that it should go to a separate location. If this characteristic is file extension (for example, all .pdf files should go to this same location) then you could potentially solve this with storage configuration and symlinks (for a UNIX deployer).

You can create a line in your storage config to map particular file extension(s) to a separate file location, and create a symlink from this location to the xyz folder.

<Item typeMapping="Binary" itemExtension=".pdf" storageId="specialMobileBinaryFiles" cached="true"/>

I have to admit I never actually did the symlink bit of this before, but it should in theory be possible. Probably there is some kind of symlink equivalent in Windows - google should be able to help you there. If you do try this, let me know if it works!

Vinoth, it would help if you could explain also why exactly you have this requirement - as it seems a little bit strange, what is wrong with the mobile publication having its own binaries?

Firstly, if you are publishing from 2 publications to the same target folder, you need to be very careful that the binaries you publish have unique filenames, otherwise binaries could be overwritten or even removed in an unwanted manner. Chris Summers has a good blogpost explaining how to ensure this here

Presumably this is not behaviour that you want for all binaries in the mobile publication (otherwise you could just set the multimedia path for this publication to be the same as for the web publication and you are done), so there is some characteristic of the binary which determines that it should go to a separate location. If this characteristic is file extension (for example, all .pdf files should go to this same location) then you could potentially solve this with storage configuration and symlinks (for a UNIX deployer).

You can create a line in your storage config to map particular file extension(s) to a separate file location, and create a symlink from this location to the xyz folder.

<Item typeMapping="Binary" itemExtension=".pdf" storageId="specialMobileBinaryFiles" cached="true"/>

I have to admit I never actually did the symlink bit of this before, but it should in theory be possible. Probably there is some kind of symlink equivalent in Windows - google should be able to help you there. If you do try this, let me know if it works!

Vinoth, it would help if you could explain also why exactly you have this requirement - as it seems a little bit strange, what is wrong with the mobile publication having its own binaries?

Firstly, if you are publishing from 2 publications to the same target folder, you need to be very careful that the binaries you publish have unique filenames, otherwise binaries could be overwritten or even removed in an unwanted manner. Chris Summers has a good blogpost explaining how to ensure this here

Presumably this is not behaviour that you want for all binaries in the mobile publication (otherwise you could just set the multimedia path and url for this publication to be the same as for the web publication and you are done - as Nicks answer shows), so there is some characteristic of the binary which determines that it should go to a separate location. If this characteristic is file extension (for example, all .pdf files should go to this same location) then you could potentially solve this with storage configuration and symlinks (for a UNIX deployer).

You can create a line in your storage config to map particular file extension(s) to a separate file location, and create a symlink from this location to the xyz folder.

<Item typeMapping="Binary" itemExtension=".pdf" storageId="specialMobileBinaryFiles" cached="true"/>

I have to admit I never actually did the symlink bit of this before, but it should in theory be possible. Probably there is some kind of symlink equivalent in Windows - google should be able to help you there. If you do try this, let me know if it works!

Source Link
Will Price
  • 16.4k
  • 1
  • 21
  • 61

Vinoth, it would help if you could explain also why exactly you have this requirement - as it seems a little bit strange, what is wrong with the mobile publication having its own binaries?

Firstly, if you are publishing from 2 publications to the same target folder, you need to be very careful that the binaries you publish have unique filenames, otherwise binaries could be overwritten or even removed in an unwanted manner. Chris Summers has a good blogpost explaining how to ensure this here

Presumably this is not behaviour that you want for all binaries in the mobile publication (otherwise you could just set the multimedia path for this publication to be the same as for the web publication and you are done), so there is some characteristic of the binary which determines that it should go to a separate location. If this characteristic is file extension (for example, all .pdf files should go to this same location) then you could potentially solve this with storage configuration and symlinks (for a UNIX deployer).

You can create a line in your storage config to map particular file extension(s) to a separate file location, and create a symlink from this location to the xyz folder.

<Item typeMapping="Binary" itemExtension=".pdf" storageId="specialMobileBinaryFiles" cached="true"/>

I have to admit I never actually did the symlink bit of this before, but it should in theory be possible. Probably there is some kind of symlink equivalent in Windows - google should be able to help you there. If you do try this, let me know if it works!