{"_id":"55e1e4dd7d91840d008249f4","editedParams2":true,"user":"55df3f52ddfb40170061cf96","version":{"_id":"55df3f6486ae7f0d00db4ca5","__v":7,"project":"55df3f6386ae7f0d00db4ca2","createdAt":"2015-08-27T16:48:36.339Z","releaseDate":"2015-08-27T16:48:36.339Z","categories":["55df3f6486ae7f0d00db4ca6","55e1376cd052580d0038c9b9","55e1391926f51b0d009b1778","55e1d40a7d91840d008249ea","55e1d6e27d91840d008249eb","55e20132d052580d0038ca67","55fe3726473f380d000b268a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"55df3f6386ae7f0d00db4ca2","__v":8,"editedParams":true,"category":{"_id":"55e1d40a7d91840d008249ea","__v":8,"pages":["55e1e1787d91840d008249f1","55e1e4dd7d91840d008249f4","55e1e7a9d052580d0038ca56","55e1f0157d91840d00824a07","55e1fa62aa9345170063c0d1","55e1fd11aa9345170063c0d3","55fe330d5c67200d00fa2f2e","55fe357c5c67200d00fa2f30"],"project":"55df3f6386ae7f0d00db4ca2","version":"55df3f6486ae7f0d00db4ca5","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-29T15:47:22.301Z","from_sync":false,"order":2,"slug":"usage","title":"Usage"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-08-29T16:59:09.567Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"","code":"http://localhost:3939/buckets/rai/upload","language":"scala"}]},"method":"post","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"fieldname\": \"file\",\n  \"originalname\": \"path.ysql\",\n  \"encoding\": \"7bit\",\n  \"mimetype\": \"yaas/sql\",\n  \"destination\": \"/Users/r1cebank/Documents/aas/storage/buckets\",\n  \"filename\": \"4k9w4GQ0.ysql\",\n  \"path\": \"/Users/r1cebank/Documents/aas/storage/buckets/4k9w4GQ0.ysql\",\n  \"size\": 328,\n  \"versions\": {\n    \"Eklcv4fQA\": {\n      \"path\": \"/Users/r1cebank/Documents/aas/storage/buckets/4k9w4GQ0.ysql\",\n      \"timestamp\": \"2015-09-17T02:28:25.594Z\"\n    }\n  },\n  \"latestversion\": \"Eklcv4fQA\",\n  \"uploadtime\": \"2015-09-17T02:28:25.594Z\",\n  \"url\": \"http://localhost:3939/buckets/rai/path.ysql\",\n  \"_id\": 3\n}","name":""}]},"settings":"","auth":"required","params":[{"_id":"55fe3167948a830d0023a5c7","ref":"","in":"body","required":false,"desc":"Authentication Key","default":"","type":"string","name":"auth"},{"_id":"55e1e52bd052580d0038ca52","ref":"","in":"body","required":true,"desc":"File to upload","default":"","type":"file","name":"file"},{"_id":"55e1e64eaa9345170063c0b7","ref":"","in":"path","required":true,"desc":"Bucket to upload file to","default":"","type":"string","name":"bucket"}],"url":"/buckets/:bucket/upload"},"isReference":false,"order":2,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"User Role Required\",\n  \"body\": \"bucket:upload\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Information\",\n  \"body\": \"The param `:bucket` should replace with the name of the bucket you want to upload file to.\"\n}\n[/block]","excerpt":"Upload files to specified bucket","slug":"bucketupload","type":"endpoint","title":"/buckets/:bucket/upload"}

post/buckets/:bucket/upload

Upload files to specified bucket

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

bucket:
required
string
Bucket to upload file to

Body Params

auth:
string
Authentication Key
file:
required
file
File to upload

Examples


Result Format


Documentation

[block:callout] { "type": "success", "title": "User Role Required", "body": "bucket:upload" } [/block] [block:callout] { "type": "info", "title": "Information", "body": "The param `:bucket` should replace with the name of the bucket you want to upload file to." } [/block]