Question

Can you please tell me what does @ means here?

acceptFileTypes: '@'

$.blueimp.fileupload.prototype.options.processQueue.push(
        {
            action: 'validate',
            // Always trigger this action,
            // even if the previous action was rejected: 
            always: true,
            // Options taken from the global options map:
            acceptFileTypes: '@',
            maxFileSize: '@',
            minFileSize: '@',
            maxNumberOfFiles: '@',
            disabled: '@disableValidation'
        }
    )
Was it helpful?

Solution

From the documentation:

@-Options

Each property of a process queue item that starts with an "@"-sign will be assigned its value following this set of rules:

  • Remove the "@"-sign.

  • If the resulting string is not empty, set the property value to the global option of the same name. e.g. disabled: '@disableVideoPreview' will be set to the global disableVideoPreview option.

    • If the property string is empty, check if the process object has the prefix property set to true:

      • If no, set its value to the global option with the same name as the property. e.g. acceptFileTypes: '@' will be set to the global acceptFileTypes option.

      • If yes, set its value to the global option with name of the property plus its action value as prefix in camel case. e.g. fileTypes: '@' from the loadVideo process above will be set to the global loadVideoFileTypes option, as the prefix property is set to true.

So, basically it means that the option will have the same value as the global option with the same (or a similar) name.


It's always good to read the documentation before you use a new tool (or at least look at the documentation when you are unsure about something).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top