ablauf.txt 2.14 KB
Newer Older
Lukas Böhm's avatar
Lukas Böhm committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Siehe Postman!!!!!



**********************************************
******* 1. send stuff user selected and get temporary file and share UUID
*********************************************
POST: /api/containers
req: duration=1, password, message, size, download_limit, number of files, captcha, filenames, emails
res: 
{
	{
		"container": {
			"UUID": "6e7b2e6e-5c32-43c8-a899-33225ee21f27",
			"duration": "1",
			"downloadLimit": "20",
			"lang": "de_DE",
			"source": "ST",
			"WSUser": null,
			"authorIP": "188.192.241.187",
			"swiftVersion": "4",
			"createdDate": {
				"date": "2021-03-07 20:39:50.667215",
				"timezone_type": 3,
				"timezone": "Europe/Zurich"
			},
			"expiredDate": "2021-03-08 20:39:50",
			"needPassword": false,
			"message": "HALLO NAME",
			"numberOfFile": "4"
		}
	}
	uploadHost: ul-gp545fun.swisstransfer.com
	{
		"filesUUID": [
			"92d11732-1fbf-4fef-b83e-aaf73e8e5a54",
			"800819b7-357f-48a3-b6c0-1681421fb38c",
			"8ac38609-cfcf-4fc1-9645-aa532295c8a6",
			"fb4fafd6-0e92-45b2-b396-e0efdc5e72ca"
		]
	}
}
stat: 201 created





**********************************************
******* (repeat) send files and store them temporarily
*********************************************
OPTIONS xhr: /api/uploadChunk/6e7b2e6e-5c32-43c8-a899-33225ee21f27/800819b7-357f-48a3-b6c0-1681421fb38c/0/1
res: "{\"method\":\"OPTIONS\"}"
stat: 200ok

POST: /api/uploadChunk/6e7b2e6e-5c32-43c8-a899-33225ee21f27/800819b7-357f-48a3-b6c0-1681421fb38c/0/1
stat: 201 created
res: uploadChunksFileDone: 1





**********************************************
******* 3. send upload complete confirmation that locks the upload and moves the stuff from temporary to permanent (starts deletion timer?)
*********************************************
POST: /api/uploadComplete
req:
Content-Disposition: form-data; name="UUID"  6e7b2e6e-5c32-43c8-a899-33225ee21f27
stat: 200 ok
res:
{
	"0": {
		"linkUUID": "a6407fb3-3b1a-48cf-abb0-edfc043ff683",
		"containerUUID": "6e7b2e6e-5c32-43c8-a899-33225ee21f27",
		"userEmail": null,
		"downloadCounterCredit": 20,
		"createdDate": "2021-03-07 20:39:50",
		"expiredDate": "2021-03-08 20:39:50",
		"isDownloadOnetime": 0,
		"isMailSent": 0
	}
}