Where is the files?
Hi everybody, I try upload a new file using the token using cURL and PHP
curl https://upload.box.com/api/2.0/files/content -H "Authorization: Bearer THE_TOKEN" -X POST -F attributes='{"name":"THE FILE", "parent":{"id":"0"}}' -F file=@THE_FILE
I get this response . . .
{"total_count":1,"entries":[{"type":"file","id":"***number removed for privacy***682","file_version":{"type":"file_version","id":"***number removed for privacy***842","sha1":"b4ec089a25f0f68da825762d8891bb00cf5bd1cd"},"sequence_id":"1","etag":"1","sha1":"b4ec089a25f0f68da825762d8891bb00cf5bd1cd","name":"a2QQ0000000wRu9MAE.png","description":"","size":941,"path_collection":{"total_count":2,"entries":[{"type":"folder","id":"0","sequence_id":null,"etag":null,"name":"All Files"},{"type":"folder","id":"2***phone number removed for privacy***","sequence_id":"0","etag":"0","name":"afc_upload_batch_1702139668_0_1495465412_a24dfe62-14fb-4fa4-aec5-10799bf84309"}]},"created_at":"2017-05-24T10:19:20-07:00","modified_at":"2017-05-24T10:19:20-07:00","trashed_at":null,"purged_at":null,"content_created_at":"2017-05-24T10:19:20-07:00","content_modified_at":"2017-05-24T10:19:20-07:00","created_by":{"type":"user","id":"***number removed for privacy***8","name":"xcaret","login":"***email address removed for privacy***"},"modified_by":{"type":"user","id":"***number removed for privacy***8","name":"xcaret","login":"***email address removed for privacy***"},"owned_by":{"type":"user","id":"***number removed for privacy***8","name":"xcaret","login":"***email address removed for privacy***"},"shared_link":null,"parent":{"type":"folder","id":"2***phone number removed for privacy***","sequence_id":"0","etag":"0","name":"afc_upload_batch_1702139668_0_1495465412_a24dfe62-14fb-4fa4-aec5-10799bf84309"},"item_status":"active"}]}
But, I can't find the new files in the box enviornment.
Where is the files?
-
I am note sure what happened.
You can try using Postman application to validate as well.
get postman here at:
You can also get predefined box api for postman:
https://cloud.box.com/v/postman-box-content
You just need to paste "AccessToken" value on the Authorization header.
You can give it a try by first renaming file and deleting folder etc. and if it works , try uploading file as well. Based on the result of this try, we can determine the next step.
thanks,
Bibek
-
Good afternoon ,
have you used an app user to upload the document or a service account? are you using the developer token obtained on the developer console page?
If the document is being succesfully uploaded and you can not see it on the root page through the web UI it means you are using different users 🙂
Thanks
サインインしてコメントを残してください。
コメント
4件のコメント