Files
To add a file to a project, first we need to upload it:
Files:
1 2 3 4 5 6
[
[
"ac.png",
"image\/png"
]
]Response:
1 2 3 4 5 6 7 8 9
[
{
"code": "4N6RJUa0v9kNCrDYNxwgZ6vba8BxktfI1aHk9RYA",
"name": "ac.png",
"mime_type": "image\/png",
"size": 1927,
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FAS5i3kyuNDrRY7ZuAM9lrFh1vw6JDCI5kBbbLAwo&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--"
}
]Now that we have uploaded a file, and got file's code, lets add it to the project:
Payload:
1 2 3 4
{
"uploaded_file_code": "4N6RJUa0v9kNCrDYNxwgZ6vba8BxktfI1aHk9RYA",
"is_hidden_from_clients": true
}Response:
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
{
"single": {
"id": 1,
"class": "File",
"url_path": "\/projects\/1\/files\/1",
"name": "ac.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 1927,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/1\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FAS5i3kyuNDrRY7ZuAM9lrFh1vw6JDCI5kBbbLAwo&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164134,
"created_by_id": 1,
"updated_on": 1430164134,
"updated_by_id": 1
}
}Lets check if we got everything uploaded properly:
Response:
1 2 3 4 5 6 7 8 9 10
PNG
IHDR 2 2 ? tEXtSoftware Adobe ImageReadyqe< )IDATxZyli}L[F[JQMLA$D+B HlD"%D68"cT"QmSc(Lf~ᛯsmI_My>Rm ǏQpoaPa_C:gg4?I@Hۚ)oh4-< al (i
[bo:B&ȏl4` l87
1եRR[v<}zE]cqS^ѽ;!n}y9ŨC۷z9 PyĵqH] '"<=OkjkQ
*sr`:q.1h2":t@ʢEh?{623!5ڳdBիx}0*nq)(385w@y۴ {/ƍx'lnߎ0 g;Pr
6l@MIhHH=5qH;yR@TUʕ(:vL+&s.]
sv'vMh0b?$Q-^zͅ.(hpdjhz:tG/nFDgϣJU~>ݿ:Ʋ1.mG^]L7:~<2$^(rJu5"320v,xZ)ܻ֮(CQq%d]<
n?Lf[MűIܾ#"s~
\H7[TV{nGj/"wj / 4]H*!3VZ$.@w ]^2>riӧ3gC.Sb4{3y]u@<H7Q+@Сl>7kǘ֊-3CW}}>Z!
h
!;wA^ͥ.mG}ѩSCrcׄ#ùе8=#"ͽױÖHTl^B`fx
{Pc^ N0#ƶm!19RͰۗ:]nn#
*h'5*:.割i&qӖBڢEi"%E6nUOLɠ^k=^B-Z+k%ΆkjBMCbI5Me}l[V4:@Mnl¨!_/Q,$k֠FsXo*Dwj|~t'mD\\Haw6MqXow6t#qz7ԑqa@|>*0~ Ď*bU#Y$C
Y?+eY&U4 āBozطr1t&#טIyl9`ϜǏ#+ԩ0 Ne:~@šRɛ_$X^F!o
1H7AY3YEudL!K Or25)A/Va XXȴϓuTp:ꊅ"9ܽnZz(
oMc᳘{e|xw)F,3IÇhG&11kf⨛CΥ*/^DUqj+4&&,ky
x5x#ү~fv3g"p-B/jb~#fOϞE.wgI:[Ș?=EBf&BdC@YYȣGM nEDKEE cI4I,1]@$U߫ c86Iw6^LK{^- ^9tX;m&25) 1*ַ_IdVkh}5 R! -+4Ss;j ӗ~I`(Ohx7/>[I_ ςܥ IENDB`There is also a way to upload a batch of files. First, lets upload them:
Files:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
[
[
"ac.png",
"image\/png"
],
[
"profile.png",
"image\/png"
],
[
"sketch.png",
"image\/png"
]
]Response:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
[
{
"code": "wMRRbvIbm9FllQmfvLPAlHzMAbB7GMris0kO9SPk",
"name": "ac.png",
"mime_type": "image\/png",
"size": 1927,
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2Fs41bOyN4v2gGvAPsGQnzE0okb6PyJfL30B4NZGFk&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--"
},
{
"code": "OwmXxivAFZ0EKPVtFPeo2s9cxHXzsPdP21c0kCEA",
"name": "profile.png",
"mime_type": "image\/png",
"size": 68914,
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FQkv22I8liMMuia7IcxEJ0VRqU26RJJ2oUmfKUcV4&original_file_name=profile.png&width=--WIDTH--&height=--HEIGHT--&ver=68914&scale=--SCALE--"
},
{
"code": "WmPFHVbqimdknRpnEVRrShMTr1uY5K6PXJkttlKB",
"name": "sketch.png",
"mime_type": "image\/png",
"size": 616656,
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2F9JeS3Kx2OLS8IUufGUxkXcbNeYGDX8BvbjnMGeqh&original_file_name=sketch.png&width=--WIDTH--&height=--HEIGHT--&ver=616656&scale=--SCALE--"
}
]Now that we have uploaded files and have their codes, we can add them by sending a POST request to /projects/:project_id/files/batch path:
Payload:
1 2 3 4 5 6
{
"file_1": "wMRRbvIbm9FllQmfvLPAlHzMAbB7GMris0kO9SPk",
"file_2": "OwmXxivAFZ0EKPVtFPeo2s9cxHXzsPdP21c0kCEA",
"file_3": "WmPFHVbqimdknRpnEVRrShMTr1uY5K6PXJkttlKB",
"is_hidden_from_clients": true
}Response:
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
[
{
"id": 2,
"class": "File",
"url_path": "\/projects\/1\/files\/2",
"name": "ac-1.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 1927,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/2\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2Fs41bOyN4v2gGvAPsGQnzE0okb6PyJfL30B4NZGFk&original_file_name=ac-1.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 3,
"class": "File",
"url_path": "\/projects\/1\/files\/3",
"name": "profile.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 68914,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/3\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FQkv22I8liMMuia7IcxEJ0VRqU26RJJ2oUmfKUcV4&original_file_name=profile.png&width=--WIDTH--&height=--HEIGHT--&ver=68914&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 586,
"height": 438
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 4,
"class": "File",
"url_path": "\/projects\/1\/files\/4",
"name": "sketch.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 616656,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/4\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2F9JeS3Kx2OLS8IUufGUxkXcbNeYGDX8BvbjnMGeqh&original_file_name=sketch.png&width=--WIDTH--&height=--HEIGHT--&ver=616656&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 1800,
"height": 400
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
}
]Lets check project files listing now:
Response:
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
{
"files": [
{
"id": 4,
"class": "File",
"url_path": "\/projects\/1\/files\/4",
"name": "sketch.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 616656,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/4\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2F9JeS3Kx2OLS8IUufGUxkXcbNeYGDX8BvbjnMGeqh&original_file_name=sketch.png&width=--WIDTH--&height=--HEIGHT--&ver=616656&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 1800,
"height": 400
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 3,
"class": "File",
"url_path": "\/projects\/1\/files\/3",
"name": "profile.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 68914,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/3\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FQkv22I8liMMuia7IcxEJ0VRqU26RJJ2oUmfKUcV4&original_file_name=profile.png&width=--WIDTH--&height=--HEIGHT--&ver=68914&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 586,
"height": 438
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 2,
"class": "File",
"url_path": "\/projects\/1\/files\/2",
"name": "ac-1.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 1927,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/2\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2Fs41bOyN4v2gGvAPsGQnzE0okb6PyJfL30B4NZGFk&original_file_name=ac-1.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 1,
"class": "File",
"url_path": "\/projects\/1\/files\/1",
"name": "ac.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 1927,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/1\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FAS5i3kyuNDrRY7ZuAM9lrFh1vw6JDCI5kBbbLAwo&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164134,
"created_by_id": 1,
"updated_on": 1430164134,
"updated_by_id": 1
}
],
"attachment_parents": []
}Files:
1 2 3 4 5 6
[
[
"ac.png",
"image\/png"
]
]Response:
1 2 3 4 5 6 7 8 9
[
{
"code": "KiX0qxzqvDMAqCApHv7MrbDEPhTCPGcXsbdQAua5",
"name": "ac.png",
"mime_type": "image\/png",
"size": 1927,
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FazXr4uAVM5dXLyiLBa9dveX2af7Re7f3n0lOTYHX&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--"
}
]and attach it to a task:
Payload:
1 2 3 4 5
{
"attach_uploaded_files": [
"KiX0qxzqvDMAqCApHv7MrbDEPhTCPGcXsbdQAua5"
]
}Response:
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
{
"single": {
"id": 1,
"class": "Task",
"url_path": "\/projects\/1\/tasks\/1",
"name": "Task #1",
"assignee_id": 0,
"delegated_by_id": 0,
"completed_on": null,
"completed_by_id": null,
"is_completed": false,
"comments_count": 0,
"attachments": [
{
"id": 1,
"name": "ac.png",
"mime_type": "image\/png",
"size": 1927,
"disposition": "attachment",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FazXr4uAVM5dXLyiLBa9dveX2af7Re7f3n0lOTYHX&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--"
}
],
"labels": [],
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"body": "",
"body_formatted": "",
"created_on": 1430164134,
"created_by_id": 1,
"updated_on": 1430164136,
"updated_by_id": 1,
"task_number": 1,
"task_list_id": 0,
"position": 1,
"is_important": false,
"due_on": null,
"estimate": 0,
"job_type_id": 0,
"total_subtasks": 0,
"completed_subtasks": 0,
"open_subtasks": 0
},
"subscribers": [
1
],
"comments": [],
"reminders": [],
"subtasks": [],
"task_list": null,
"tracked_time": 0,
"tracked_expenses": 0
}Now when we try to load project files, we will see that attachment that we just uploaded is listed:
Response:
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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
{
"files": [
{
"id": 1,
"class": "Attachment",
"url_path": "\/attachments\/1",
"name": "ac.png",
"parent_type": "Task",
"parent_id": 1,
"mime_type": "image\/png",
"size": 1927,
"md5": "1e3cd308a17a60b22c61493dcb3af0b0",
"download_url": "http:\/\/feather.dev\/attachments\/1\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FazXr4uAVM5dXLyiLBa9dveX2af7Re7f3n0lOTYHX&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164136,
"created_by_id": 1,
"disposition": "attachment",
"project_id": 1,
"is_hidden_from_clients": true
},
{
"id": 4,
"class": "File",
"url_path": "\/projects\/1\/files\/4",
"name": "sketch.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 616656,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/4\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2F9JeS3Kx2OLS8IUufGUxkXcbNeYGDX8BvbjnMGeqh&original_file_name=sketch.png&width=--WIDTH--&height=--HEIGHT--&ver=616656&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 1800,
"height": 400
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 3,
"class": "File",
"url_path": "\/projects\/1\/files\/3",
"name": "profile.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 68914,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/3\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FQkv22I8liMMuia7IcxEJ0VRqU26RJJ2oUmfKUcV4&original_file_name=profile.png&width=--WIDTH--&height=--HEIGHT--&ver=68914&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 586,
"height": 438
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 2,
"class": "File",
"url_path": "\/projects\/1\/files\/2",
"name": "ac-1.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 1927,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/2\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2Fs41bOyN4v2gGvAPsGQnzE0okb6PyJfL30B4NZGFk&original_file_name=ac-1.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164135,
"created_by_id": 1,
"updated_on": 1430164135,
"updated_by_id": 1
},
{
"id": 1,
"class": "File",
"url_path": "\/projects\/1\/files\/1",
"name": "ac.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 1927,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/1\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FAS5i3kyuNDrRY7ZuAM9lrFh1vw6JDCI5kBbbLAwo&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164134,
"created_by_id": 1,
"updated_on": 1430164134,
"updated_by_id": 1
}
],
"attachment_parents": {
"Task": {
"1": {
"id": 1,
"class": "Task",
"url_path": "\/projects\/1\/tasks\/1",
"name": "Task #1",
"assignee_id": 0,
"delegated_by_id": 0,
"completed_on": null,
"completed_by_id": null,
"is_completed": false,
"comments_count": 0,
"attachments": [
{
"id": 1,
"name": "ac.png",
"mime_type": "image\/png",
"size": 1927,
"disposition": "attachment",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FazXr4uAVM5dXLyiLBa9dveX2af7Re7f3n0lOTYHX&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--"
}
],
"labels": [],
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"body": "",
"body_formatted": "",
"created_on": 1430164134,
"created_by_id": 1,
"updated_on": 1430164136,
"updated_by_id": 1,
"task_number": 1,
"task_list_id": 0,
"position": 1,
"is_important": false,
"due_on": null,
"estimate": 0,
"job_type_id": 0,
"total_subtasks": 0,
"completed_subtasks": 0,
"open_subtasks": 0
}
}
}
}System allows update of file's visibility, but other properties are lcoked. If we try to updated them, we will get Bad Request error:
Payload:
1 2 3
{
"name": "New Name 123"
}But update of visibility flag will work just fine:
Payload:
1 2 3
{
"is_hidden_from_clients": true
}Response:
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
{
"single": {
"id": 1,
"class": "File",
"url_path": "\/projects\/1\/files\/1",
"name": "ac.png",
"is_trashed": false,
"trashed_on": null,
"trashed_by_id": 0,
"project_id": 1,
"is_hidden_from_clients": true,
"mime_type": "image\/png",
"size": 1927,
"md5": null,
"download_url": "http:\/\/feather.dev\/projects\/1\/files\/1\/download",
"thumbnail_url": "http:\/\/feather.dev\/proxy.php?proxy=forward_thumbnail&module=system&v=current&b=DEV&context=upload&name=2015-04%2FAS5i3kyuNDrRY7ZuAM9lrFh1vw6JDCI5kBbbLAwo&original_file_name=ac.png&width=--WIDTH--&height=--HEIGHT--&ver=1927&scale=--SCALE--",
"file_meta": {
"kind": "image",
"dimensions": {
"width": 50,
"height": 50
}
},
"created_on": 1430164134,
"created_by_id": 1,
"updated_on": 1430164137,
"updated_by_id": 1
}
}Lets move a file to trash: