Files are the heart of the Onehub service and are organized via folders. You can create, read, download, update, and delete files. You can also list all items in a folder.
All files are versioned. Creating a file in the same location of an identically named file will automatically create a new version of the previously existing file.
All Files have Thumbnails. Thumbnails are generated image representations of a file in PNG format. They are 128 pixels on their largest side with the shorter side varying, based on the aspect ratio of the file. If the file is smaller than 128x128, the thumbnail will be exactly the same size as the file.
:id
.content-type
header of multipart/form-data
rather than application/json
.multipart/form-data
before being uploaded. We recommend using an existing multipart library in your language of choice.//
//
If a filename has characters that would render it invalid, the name will automatically be changed to one that is valid. For example, file/name.txt
would be changed to file-name.txt
.
:id
.{"file": {"id": 849607,"filename": "onehub-logo.png","created_at": "2016-01-15T16:22:44-08:00","updated_at": "2016-01-15T16:23:20-08:00","user_id": 481,"workspace_id": 4137,"ancestor_ids": [849587,849597],"errors": {},"hidden?": false,"size": 6736,"thumbnail": {"id": 791577,"state": "ready","created_at": "2016-01-15T16:22:44-08:00","updated_at": "2016-01-15T16:22:46-08:00","width": 128,"height": 33,"url": "/thumbnails/791577"}}}
:id
.​
:id
.{"file": {"id": 849607,"filename": "renamed.png","created_at": "2016-01-15T16:22:44-08:00","updated_at": "2016-01-20T15:24:48-08:00","user_id": 481,"workspace_id": 4137,"ancestor_ids": [849587,849597],"errors": { },"size": 6736,"thumbnail": {"id": 791577,"state": "ready","created_at": "2016-01-15T16:22:44-08:00","updated_at": "2016-01-15T16:22:46-08:00","width": 128,"height": 33,"url": "/thumbnails/791577"}}}
:id
.//
:id
is provided.//