File Uploads

From CaisisWiki

(Difference between revisions)
Jump to: navigation, search
Avinash (Talk | contribs)
(Created page with '==File Upload Location== The recommended location of uploaded files is withing the App_Data folder in the application root. By default, this directory is shielded by .NET and IIS…')
Newer edit →

Revision as of 16:23, 11 June 2010

Contents

File Upload Location

The recommended location of uploaded files is withing the App_Data folder in the application root. By default, this directory is shielded by .NET and IIS and will prevent any direct access by clients. The configuration xml files are also stored here.

Create File Upload Folder

By default file uploads are located in the folder ~/App_Data/FileUploads/.

  1. Create a folder called FileUploads or any name of our choosing inside ~/App_Data/.
  2. Update the web.config file or use the Caisis Configuration to point to this new location.
  3. NOTE: This location must be a relative path.

Sample web.config value

<add key="fileUploadLocation" value="~/App_Data/FileUploads/" />

Migrating existing File Uploads

Full paths to the uploaded files are not kept in the database and are only relative to the FileUploadLocation.

Ex: Files were previously located at ~/Plugins/FileUpload/UploadedFiles/

  1. Move ("cut") the UploadFiles folder, and paste to the ~/App_Data/ folder, and rename UploadFieles to FileUploads.
  2. Update the web.config to match the new path.
  3. The folder names are not important, just that the match the value in the web.config file.

File Uploaded Mapped to Network Drive

As of Caisis 5.0, paths to mapped drives cannot be set directly, however you can create a virtual mapping in IIS, which points to a folder withing the application. Ex: Network drive is located at "Z:/"

  1. Create a new virtual directory inside the Caisis/App_Data folder called FileUploads and map to folder "Z:/"
  2. Update web config as stated above.
Personal tools