Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

How do I get SS to allow filetype HOL to be uploaded?


Go to End


8 Posts   3425 Views

Avatar
Junglefish

Community Member, 109 Posts

14 November 2014 at 12:24am

I have been getting the "There was a problem with the upload. The server did not accept it." error.

I have tried adding File::$allowed_extensions[] = 'HOL'; to cms\_config.php but no joy there.

Anyone?

Avatar
Junglefish

Community Member, 109 Posts

21 November 2014 at 1:35am

<bounce>

Really, is this so difficult literally nobody knows how to do it?

:-)

Avatar
martimiz

Forum Moderator, 1391 Posts

21 November 2014 at 4:43am

Maybe because you posted it in the DataObjectManager section - a SilverStripe 2 module? :)

You're not mentioning your SilverStripe version, but if it's 3, this may help: http://www.silverstripe.org/community/forums/general-questions/show/20187

Avatar
Junglefish

Community Member, 109 Posts

21 November 2014 at 5:01am

Hi Martimiz

I posted here because there were other similar questions posted in this section. If there's a more appropriate section, please let me know.

We're using version 2.4.0

The topic you linked to wouldn't have really helped. I don't want to 'restrict' uploads to just certain file types; I want all currently allowed filetypes to still be allowed, but I want to make .HOL filetypes allowable as well.

Any thoughts?

Avatar
martimiz

Forum Moderator, 1391 Posts

21 November 2014 at 6:13am

Edited: 21/11/2014 6:20am

I replayed this on a local 2.4.2 site I still have and for me this (in mysite/_config.php) just worked:

File::$allowed_extensions[] = 'HOL';

(on a renamed textfile) I was kind of hoping it wouldn't, so I could help find a solution... Reloaded the CMS, then tried a default File section upload and one using the ImageField. No issues whatsoever, sorry :(

[edit:] this was with DataObjectManager and Uploadify...

Avatar
Junglefish

Community Member, 109 Posts

21 November 2014 at 10:40pm

Okay, I added that line: File::$allowed_extensions[] = 'HOL';
to both \mysite\_config.php and \cms\_config.php

Restarted all WAMP services

Re-initialised the website with a ?flush=1

Tried uploading both a real .HOL file and a text file re-named with a .HOL extension

Still getting the "There was a problem with the upload. The server did not accept it." error. :-(

What else can I try??

Avatar
martimiz

Forum Moderator, 1391 Posts

22 November 2014 at 2:23am

WAMP... So you are on Windows? Do you by any chance have a web.config file in your assets directory? If so, you might have to add your file-extension there as well...

Avatar
Junglefish

Community Member, 109 Posts

22 November 2014 at 2:39am

Hi

In this directory, no.
C:\wamp\www\[project name]\SilverStripe\assets

I have a .htaccess file, but no web.config