Upload File Types

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/3/2012 9:05:05 AM
Gravatar
Total Posts 148

Upload File Types

I was trying to upload a file to my site and I received an error, "File type not allowed".

How can I add my file type so I can upload it to my site?

4/3/2012 9:57:38 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: Upload File Types

Add the AllowedUploadFileExtensions entry to your user.config file and modify it to include the type of file you want to upload. Below is the current default entry from the web.config file.

<add key="AllowedUploadFileExtensions" value=".gif|.jpg|.jpeg|.png|.flv|.swf|.wmv|.mp3|.mp4|.m4a|.m4v|.oga|.ogv|.webma|.webmv|.webm|.wav|.fla|.tif|.asf|.asx|.avi|.mov|.mpeg|.mpg|.zip|.pdf|.doc|.docx|.xls|.xlsx|.ppt|.pptx|.pps|.csv|.txt" />

Depending upon where what functionality you are using to upload the file to the site and what roles the user has, you may also want to be aware of the AllowedLessPriveledgedUserUploadFileExtensions entry in the web.config. I am not 100% sure where this is taken into account, but just wanted to mention it in as it may apply. The default value is below.

<add key="AllowedLessPriveledgedUserUploadFileExtensions" value=".gif|.jpg|.jpeg|.png|.zip|.pdf"/>

Oh, also remember to touch your web.config file after you modify/save your user.config so that the user.config changes are picked up.

4/3/2012 10:37:06 AM
Gravatar
Total Posts 148

Re: Upload File Types

If I create a folder using the File Manager, is the folder actually created on disk?  I looked at my site location and can't find the folders I created using File Manager.

Also, when I try to access the files I upload, the site can't find them...404 error.

4/3/2012 10:53:03 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: Upload File Types

Yes, if you create a folder via File Manager it is created on disk. It will be located in the Data/Sites/site-number directory of your mojoPortal install (or whatever sub-directory you may have decided to create it in).

If you can't locate the directory or file on the physical disk, if you go back to File Manager are you still able to see them there?

Are there any errors in the system log after you create the folder and upload the file?

Does the Data directory (and sub-directories) have the proper permissions set up so that mojoPortal can write to those directories?

Just trouble shooting questions to try and help without actually seeing what is going on.

4/3/2012 11:01:19 AM
Gravatar
Total Posts 148

Re: Upload File Types

Does that mean I need to prefix all my links with "/Data/Sites/1/MyDirectory"?

4/3/2012 11:07:34 AM
Gravatar
Total Posts 81
Website Hobbyist and Software Engineer
Proud member of the mojoPortal team
www.doan.me

Re: Upload File Types

Yes, you do need to provide the path to the file from any links.

You must sign in to post in the forums. This thread is closed to new posts.