New Box View Upload - json is good but file does not appear in box
AnsweredHi folks,
Any help with this upload would be appreciated.
I am using the New Box View and only want to upload a file.
I use this curl command and get the following json. The json looks nearly identical to the json shown in the docs (https://docs.box.com/reference#upload-a-file), it identifies the correct app, but I do not see my file uploaded. I've tried both the top directory (0) and a new one I created.
curl:
curl -tls1.2 https://upload.box.com/api/2.0/files/content -H "Authorization: Bearer " -X POST -F attributes="{\"name\":\"testtest.txt\", \"parent\":{\"id\":\"***number removed for privacy***65\"}}" -F file=@C:\\testtest.txt
returned json:
{"total_count":1,"entries":[{"type":"file","id":"15***phone number removed for privacy***","file_version":{"type":"file_version","id":"16***phone number removed for privacy***","sha1":"theSHA"},"sequence_id":"0","etag":"0","sha1":"theSHA","name":"testtest.txt","description":"","size":27,"path_collection":{"total_count":2,"entries":[{"type":"folder","id":"0","sequence_id":null,"etag":null,"name":"All Files"},{"type":"folder","id":"***number removed for privacy***65","sequence_id":"0","etag":"0","name":"afc_upload_batch_1358458785_0_1491600036_b4a52003-a023-49bb-8443-155bd44d25ce"}]},"created_at":"2017-04-10T08:59:02-07:00","modified_at":"2017-04-10T08:59:02-07:00","trashed_at":null,"purged_at":null,"content_created_at":"2017-04-10T08:59:02-07:00","content_modified_at":"2017-04-10T08:59:02-07:00","created_by":{"type":"user","id":"***number removed for privacy***5","name":"ClassifiedDocUpload","login":"***email address removed for privacy***"},"modified_by":{"type":"user","id":"***number removed for privacy***5","name":"ClassifiedDocUpload","login":"***email address removed for privacy***"},"owned_by":{"type":"user","id":"***number removed for privacy***5","name":"ClassifiedDocUpload","login":"***email address removed for privacy***"},"shared_link":null,"parent":{"type":"folder","id":"***number removed for privacy***65","sequence_id":"0","etag":"0","name":"afc_upload_batch_1358458785_0_1491600036_b4a52003-a023-49bb-8443-155bd44d25ce"},"item_status":"active"}]}
Thoughts?
Thanks,
Pamela
-
Well...apparently my upload is good. When I Get Folder Info with:
curl https://api.box.com/2.0/folders/myFolderID -H "Authorization: Bearer "
the files are there. I had assumed I would be able to see via the URL I set up when I set up my account. But I don't see them there. Where should I be able to see them?
-
Hello ,
when you upload a document with New Box View approach you are uploading documents with an AutomationUser_ID_vn........ (at) boxdevedition.com user. That means that, if you want to see the documents uploaded by that app with your own personal user, you have to add that user as a collaborator on a folder where you have access.
The problem is that there is no way from API to get the user ID or name. As you pointed out you can "discover" that user through the admin content manager pane. Once you have its mail, then it can be invited as a collaborator and start working as any other collaboration.
Regards,
Please sign in to leave a comment.
Comments
3 comments