registerAction doesn't work

Hi,

I try to develop an app and add an action to File menu. But I didn’t success at all. My new action doesn’t appear at all. Can someone help me with that ?

(function (OCA) {

    "use strict";

    OCA.Files = OCA.Files || {};

    OCA.Files.QrCodePlugin = {

        name: 'qrCode',

        _extendFileActions: function (fileActions) {

            fileActions.registerAction({

                name: 'qrCode',

                displayName: 'qrCode',

                altText: t('qrCode', 'qrCode'),

                mime: 'all',

                permissions: OC.PERMISSION_NONE,

                iconClass: 'icon-history',

                type: OCA.Files.FileActions.TYPE_INLINE,

                order : 100,

                actionHandler: function actionHandler(filename, context) {

                    console.log('youhou');

                    console.log(filename, context);

                }

            });

        },

        attach: function (fileList) {

            this._extendFileActions(fileList.fileActions);

        }

    }

}) (OCA);

OC.Plugins.register('OCA.Files.FileList', OCA.Files.QrCodePlugin);

I cannot see any issue with your code. The file actions displays properly as an inline action:

image

Do you see any errors in your browser console? Is the file loaded properly when accessing the files list?

I found the error. I use inline instead of dropdown.