1

I have almost the same question asked there How to change upload folder dynamicly. But I need to change the whole path, not only subpath of "~/Files". How can I do that?

Community
  • 1
  • 1
AlbertK
  • 11,841
  • 5
  • 40
  • 36
  • I'm attempting to do a similar thing (my use case requires several more levels of nested directories) - haven't found a way to do it. The `objectContext` and `uploadContext` seem to only allow for a max of 3 levels (e.g. `/Uploads//`) – infl3x Oct 05 '16 at 04:32

1 Answers1

0

I think you have to change te filesroot property in the .config file to "~/" or otherwhise to "" And then in your view give the path to objectContext

Martin
  • 141
  • 10
  • Can I set FilesRoot property in code? For example one file I want to save in "C:\Files", second file in "D:\Uploads", third file in "\\SomeServer\Docs\"? – AlbertK Feb 04 '15 at 06:45
  • No I think you cannot set the FilesRoot property in code. You can set the objectContext. Try to give the whole path to objectContext and see what happens. Quote from the .config file : filesRoot is the root folder for all uploads. objectsRoot is a subfolder an can be ommitted if you do not need it So I'm not sure if its going to work. Try to leave the filesRoot empty – Martin Feb 05 '15 at 08:04