Currently text files, images and flash files are defined as inline types

// By default, serve images, text, and flash content for display rather than
// download. Or if variable 'filefield_inline_types' is set, use its patterns.
$inline_types = variable_get('filefield_inline_types', array('^text/', '^image/', 'flash$'));

This is all good, but the problem is when say a text file is clicked, the current window is replaced with the text file. Instead the text file should open up in a new window?

Comments

bibstha1’s picture

Also may be, put a default option to edit variable "filefield_inline_types" in filedepot settings interface itself? I don't see a way to edit this at the moment, except create my own module.

I might be wrong, is there any interface as such?

_randy’s picture

Category: bug » feature

filefield_inline_types is from the cck module called filefield which filedepot uses. Filedepot re-uses the same code lines to fetch which items are deemed to be inline.

Using the variable_get means that you can specify the inline file types as a default if the variable is not set.
Using Strongarm, I don't even see the filefield_inline_type as an exportable variable meaning that it is actually not set on a clean installation of the filefield module.

I suppose (technically) we could override that functionality by providing an interface for it. However currently there isn't one.
Hacking module/core code is sometimes a no-no, but you could override the setting in filedepot until an interface is created.

(changing this from a bug to a feature request)

JCB’s picture

Hi Guys,

Here is how I got my Filedepot to supply popup box to save file instead of opening in same window.

First let me state that I think these 3 posts are all experiencing the same issue.
http://drupal.org/node/1543430
http://drupal.org/node/979482
http://drupal.org/node/966256

Here is my solution (derived from http://drupal.org/node/966256)
1. edit the filedepot.module file
2. Replace
$inline_types = variable_get('filefield_inline_types', array('^text/', '^image/', 'flash$'));
with
$inline_types = ''
3. Make sure you get both instances in the filedepot.module file

This worked for me.

_timpatrick’s picture

Status: Active » Closed (fixed)

Moving this to closed unless any new issues arise

skuchy11’s picture

Thanks JCB :)

subhojit777’s picture

Version: 6.x-1.0 » 7.x-1.x-dev
Issue summary: View changes
StatusFileSize
new1.83 KB

Thanks @JCB. Here is a patch according to @JCB's suggestion in #3

subhojit777’s picture

StatusFileSize
new1.85 KB

Better patch would be this.