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

accept-2

Restrict what can be dropped on app instances.

Accepting means allowing specific files to be dropped into an instance.

This accept-2 file type is only intended to be used on .Accept files.

Usage

An accept-2 file can be configured via string attributes named bucket-N, where N is a number from range 1..255.

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.

Special bucket 0

Bucket 0 is treated as a special bucket used for code, assets and other developer resources. It can not be configured to safely accept children.

Validating the .Accept file

Open it in your browser to validate it.

Examples

Accept nothing

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

Accept everything in bucket 1

{
    "title": "",
    "link": "",
    "type": "accept-2",
    "statusCode": 0,
    "attr": {
        "bucket-1 string": ""
    }
}

Accept pages in bucket 1

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

Accept images in bucket 1

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

Accept files that can be inlined in bucket 1

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

Accept files that can be inlined and serve requests in bucket 1

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

Accept files that can be inlined both in bucket 1 and 2

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

Implemented OS Interfaces

.Request