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 ImageReadyqÉe< )IDATxÚìZylŒiÿ}ßL[½ôF[¶êJQ÷MëL°A$Dˆ+B ëÚHlD"›%D6Ž8"üc³Ž¬T¤Ä"¤QmÖÕSÛc(íL�ùfö÷~�ᛯs›mõI_MßyÞ÷÷>×ïùRãm �ÎÇ�ÔQÔpªÿoá‘a¥æPæa_ùC:¸Ægg4?éI�@ýÞHÛš)—ˆ³o“ùÏh4-<Ò€„ Ž Äal („´iÒ
ä[boâí:B&È�üì¸l¹4` Álª87
1Õ¥ÂRR¸[Ãvõ°<}Šz‹E]cðq»S�²Œè^½Ñ½;Â’“!Ñn}y9¬ÅŨÎËCíÛ·êz9 Pyĵqì€H]° ñ'"<=†ÈÈOkjkQûæ
*sr`:qå—.©ß1h»–ó2":t@Ê¢Eh?{6¢23!‡…5Ú³ÖdBÅÕ«x}ø0*nÜðëq)(ä3ÍÛ›Ø85Ýwì@ò¼y�Û´ È{å—/ãÉÆ�xûàÁ'·è¸lºnߎ0‚ ¬g;Prê
6l@MI‰ÛÅh¤HºäH=5qäHô;yRõ@°¢TUáñÊ•(:vL½Ñô+ÐëÀ�&å¤õùsä.]
sv¶'ÏÉvMèhµŽš0b�?ß$ª¢¢ÐçèQ¤-^¬zöÍ…¨.(h’pædÒäÉjhz:¯tÁƒGÄ/ÚÐõ£nßFDgÏ£JU~>ÞÝ¿�:Ʋ1.mû÷GìàÁ“ßÍ^]îL˜€’›7‘:~<†2ì$¹á^……(»rï‚Ju5"32�0v,âx‰Z)Ü»�Ö®…¤(C«Qq%dÏ]»<‚øðè
¶nÅ?Lf[MÍÇÏű↌ÿ¤I“ܾ#‡†"sÿ~˜‡
ƒ‰ \ÁðH7ù[¶ �Ÿ×TVº{’ÚnÊôÞ³Gj/"wõjŸ /ý¡óˆ Ïê4æî]H÷Ô*ç!þš3V–Z£®$º.@æwúò ]¸±^2Æÿ>riÓ§Ã�Â3gÔCË.S„b4Ë{‡3ð‚yåð]µŠ¤ßu@„�þ<H7ºQ+†@öС°”•ùl>®7škǘ֊ùÖ-Ü3†‡CWš}•}ƒÿ>âžìŠZ!
h§
!;wâAÈ^’Í¥.¯æmÞG}½›�Ø�Ñ©SCrú±cׄ¬#€µ²Ã¹Ðµ8Œ=#"ͽױÖ°âHšµ¾Tl^ÁB`fxºå
{Pc^ ÐN0ÚÈ#ƶm!19µRͰ²”–º¹Û—:œåû]nn#Ï
*¢h'5*:.割ˆòi³Û&q’Ó–BÚ¢™½Ei"Áô%²ÞE6nîÐÕêðŽUOŠLÉ ^¢ù™ýk„–âº=ç^½B-“Z+‚k%®†‹€ŠÊΆš¨kjB’§MC½bÀŽÝI“ê5¡ïMe}l[V”æä4:@ïM›Ônló«Â¨¨žëÖ!”_/Q,$kÖ FsXo*ìDwíªj�¿ª¥¿ñ|~út£´'mD\çá†\ÆH±aw6MqXoÒwÛ6t#…¯qÚÒîízŠ7Ô‘éqçÎa™@|Ÿ>*0»ï~ ÄŽ±®Ž*b»’Uª#›Y$CÊ
›Y?+eY&³U4 Ä�BÂÃÑoýzŒØ·rˆ÷˜‚1t&#טIy¬Ælš°”9`¥Ïœ‰±Ç�#†Ü+”ùùÝÔ©0 Næìe:©”~ó@Å¡RÉ›¦_¿®ò$½X^¿F!oê
1ÅH7’†Aú¬YˆåÆÁˆ…3†‰û˜YªEuŒdÃL!K õ´öOr°2®5è)ÊA/óˆ¡�«Va ÛçÊãƒÕÉX²ä³ìXÈ´Ï“uTpÖñ:ꊅ÷"¢9ŽÜ½›þnZåÏç¨z�•(
o¼÷òåM²cæá³˜{e|†xèw†)ÌæF¬§Ú,ò¥˜3IÅÇhGžÔ&11à�kÍfÜ⨛CÎ¥ò*ެÏ/^DUq±j+4&&°·,äky‡áòÂ…xËÜ5xî#•Ò¯~fv‡3g"˜p½-B/jb¿~#½¼çfOÏžE.©wù³gêíI:[ÑññȘ?=æÎEBf&B££Ý÷dCþ@À…YYÈ£GM÷î© nðEãñDK©EE cÅI4I,‡1�]€ª™ˆå¬@¥$‹Uïß«ýØ c8ÂÆõè�6Iõw6ª^¾„™¨…ÕL�ÆK{¢ ì^¥-ÝÆ ^¬9tÍX;mÔº¢&½25øŠ‚±)û �ÁØ1*ßú»ßÖ·ñ_Id´†Vkh}5 RÀ! -¡+È4ü™Ss–;¢jí Ó—~«ñªI`Ô(ŸÿËçOhx†7/ˆ±>[œ›Iþä_ ËςܥŸñï IEND®B`‚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: