[owncloud-devel] FileActions not displayed for TIFF files

Héctor Acosta hacosta at inventiaplus.com
Thu Feb 4 16:47:14 GMT 2016

I'm having issues at including custom FileActions in the dropdown list for
TIFF files.

I'm currently using Owncloud Server 8.2.1.

I've created a custom app that downloads a "low-res" version of an image.
This option is accesible through the three-dotted dropdown menu of every
file. It works for other image formats such as JPEG or PNG, except for
TIFF. I know OwnCloud has some issues with TIFF files for features like
showing a preview etc. but I don't think this affects my current issue.

I register my action including this piece of code in the js file of my app:

if ( typeof OCA !== 'undefined'
&& typeof OCA.Files !== 'undefined'
&& typeof OCA.Files.fileActions !== 'undefined'
) {
name:'Download preview',
displayName:'Download preview',
order: 2500,
icon: OC.imagePath('core', 'actions/history'),
permissions: OC.PERMISSION_READ,
actionHandler: imagedownloadFileAction.onImageDownload
OCA.Files.fileActions.setDefault(mime, 'Download preview');

When I debug getActions function in apps/files/js/fileactions.js the
filteredActions variable shows my FileAction, however, it is never added to
the dropdown list.

As I mentioned before, I have tried with several values for mime in
registerAction (even with 'image' and 'all') and it always work for every
image format but for TIFF. I want to be sure it is an issue and not my
mistake before posting to Github. Any solution/workaround?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20160204/6bc54559/attachment.html>

More information about the Devel mailing list