Try our conversational search powered by Generative AI!

Change location for import files in CMS 6

Vote:
 

Hi!

I've come across a problem:
Our customer is having a test site hosted by EPiServer and when they import pagetypes and pages the import file is being saved in C:/// and I need to change this to D:/// to avoid the OS drive from getting full over time.
However, I cannot find anything on the forum about this and nothing in the configuration files seems relevant.

Does anybody know how I can change this, if it's even possible?
Can it be because the CMS is installed on the C: drive?

Regards
Ludvig Flemmich

#150865
Jun 30, 2016 15:58
Vote:
 

Hi Ludvig,

when you say "they import page types and pages the import file is being saved in c:\". Do you mean that EpiServer stores the file there when the customer use "import" in Admin mode and uploads the file in the form?

also, when you're referring to CMS being installed on c:, do you mean that episerver is installed in c:\program files, or that your website is deployed to c:?

last question: where on c: do you mean with folder\subfolder? Is it somewhere in a temporary folder, near the website or vpp folders or somewhere in the Windows folder?

#150872
Jul 01, 2016 0:41
Vote:
 

Hi Alf,

Yes they use the import function in Admin mode and upload page types and pages and the file itself is stored in that folder.
When I mean CMS being installed I mean what you said, C:\Program files\, the different EPiServer versions and dll's etc.
The files are stored in a temporary folder, like C:\Temp\ for example.

Any ideas of how I can change which folder the temporary files are saved in?

Regards
Ludvig Flemmich

#150884
Jul 01, 2016 10:25
Vote:
 

This uses the Path.GetTempPath() under the hood to find a directory to temporarily store the file. 

You need to set the environment variable to change the default path. Something like:

var tempPath = "...new path...";
Environment.SetEnvironmentVariable("TMP", tempPath);
Environment.SetEnvironmentVariable("TEMP", tempPath);

Should be enough to set TMP variable. I think that one is check first...

#150891
Edited, Jul 01, 2016 11:22
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.