[owncloud-devel] FileActions not displayed for TIFF files

Vincent Petry pvince81 at owncloud.com
Thu Feb 4 16:54:22 GMT 2016


First check if the "data-mime" attribute of the "tr" row of the TIFF
file has the correct mime type.

Maybe the mime type isn't set properly on the server ?



On 04.02.2016 17:47, Héctor Acosta wrote:
> 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'
> ) {
> OCA.Files.fileActions.registerAction(
> {
> mime:'image/tiff',
> 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?
> _______________________________________________
> Devel mailing list
> Devel at owncloud.org
> http://mailman.owncloud.org/mailman/listinfo/devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20160204/e2aee629/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20160204/e2aee629/attachment.sig>

More information about the Devel mailing list