Presentation

SimpleCIDServer is a very simple server written in PHP. It allows the uploading of files into a tree of folders. It contains three steps :

  1. an optional exchange which checks the authorization and authentication ;

  2. a required upload which contains the file to deploy ;

  3. a required interaction step which allows the user to choose the destination of the uploaded file.

SimpleCIDServer manifest

1
<?xml version='1.0' encoding='UTF-8'?>
2
<cid:manifest xmlns:cid="http://www.cid-protocol/schema/v1/core" xmlns:xml="http://www.w3.org/XML/1998/namespace"
3
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
              xsi:schemaLocation="http://www.cid-protocol/schema/v1/core ../manifest/cid-core.xsd ">
5
    <cid:process>
6
        <cid:label xml:lang='en'>Deposit file</cid:label>
7
        <cid:doc xml:lang='en'>This server accepts any content and allows the sender to choose the storage directory.
8
        </cid:doc>
9
        <cid:meta name='file-name' is='http://schema.org/name'>
10
            <cid:label>File name</cid:label>
11
        </cid:meta>
12
        <cid:meta name='file-url' is='http://schema.org/url'/>
13
        <cid:exchange url="http://www.example.com?cdaction=testAuth\" required='false'
14
                      is='http://schema.org/AuthorizeAction'/>
15
        <cid:upload url="http://www.example.com?cdaction=upload\" required='true' useMetas='file-name'/>
16
        <cid:interact url="http://www.example.com?cdaction=negotiationFrame\" required='true' returnMetas='file-url'/>
17
    </cid:process>
18
    <cid:transports>
19
        <cid:webTransport sessionProperties='uploadedFile'>
20
            <cid:authentications>
21
                <cid:basicHttp/>
22
            </cid:authentications>
23
            <cid:webExchange>
24
                <cid:request method='GET' properties='header queryString'/>
25
                <cid:request method='POST;application/x-www-form-urlencoded' properties='post header queryString'/>
26
                <cid:request method='POST;multipart/form-data' properties='post header queryString'/>
27
            </cid:webExchange>
28
            <cid:webUpload>
29
                <cid:request method='PUT' properties='header queryString'/>
30
                <cid:request method='POST' properties='header queryString'/>
31
                <cid:request method='POST;multipart/form-data' properties='post header queryString'/>
32
            </cid:webUpload>
33
            <cid:webInteract>
34
                <cid:request method='GET' properties='queryString'/>
35
                <cid:request method='POST;application/x-www-form-urlencoded' properties='post queryString'/>
36
                <cid:request method='POST;multipart/form-data' properties='post queryString'/>
37
            </cid:webInteract>
38
        </cid:webTransport>
39
    </cid:transports>
40
</cid:manifest>