WARNING: The [.Accept] file and the [accept-3] file type are deprecated, use the [.Buckets] file instead.

accept-3

Restrict what can be dropped on app instances.

Accepting means allowing specific files to be dropped into an instance. This accept-3 file type is only intended to be used on .Accept files.

Note on buckets vs sections

There was a concept called buckets that was too unusual thus too complex, so we are phasing them out in favor of sections. Sections are simply files in other files to allow grouping their children, for example if you have a 2-columns app. The older type accept-2 supported accepting files in specific buckets, accept-3 is not aware of buckets any more. The .Accept file needs to be defined on the section files instead.

Usage

An accept-3 file can be configured via the string attribute accept.

The attribute values must be a space separated lists of app methods. There are 2 special values:

  • .Image - currently only the built-in image-1 app implements it, and
  • .None - which can not be implemented.

Built-in methods you will likely want to use:

  • .Inline,
  • .Request,
  • .Page.

You can also use user-space methods, like .foo. User-space methods start with a dot followed by a lower-case letter. This allows you to create applications that only allow one to drop specific file types - those that implement that interface.

Validating the .Accept file

Open it in your browser to validate it.

Examples

Accept everything

{
    "title": "",
    "link": "",
    "type": "accept-3",
    "statusCode": 0,
    "attr": {
        "accept string": ""
    }
}

Accept nothing

Do not create the .Accept file or use:

{
    "title": "",
    "link": "",
    "type": "accept-3",
    "statusCode": 0,
    "attr": {
        "accept string": ".None"
    }
}

Accept pages

{
    "title": "",
    "link": "",
    "type": "accept-3",
    "statusCode": 0,
    "attr": {
        "accept string": ".Page"
    }
}

Accept images

{
    "title": "",
    "link": "",
    "type": "accept-3",
    "statusCode": 0,
    "attr": {
        "accept string": ".Image"
    }
}

Accept files that can be inlined

{
    "title": "",
    "link": "",
    "type": "accept-3",
    "statusCode": 0,
    "attr": {
        "accept string": ".Inline"
    }
}

Accept files that can be inlined and serve requests

{
    "title": "",
    "link": "",
    "type": "accept-3",
    "statusCode": 0,
    "attr": {
        "accept string": ".Inline .Request"
    }
}

Implemented OS Interfaces

.Request