aboutsummaryrefslogtreecommitdiffstats
path: root/doc/en/api/api_filedata.md
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-04-30 06:59:19 +0000
committerMario <mario@mariovavti.com>2024-04-30 06:59:19 +0000
commit7c34a3676d294c9a1acc69f71ab3061074509160 (patch)
treead04cef0d545c5e5e24e76060b6c32d65363d48e /doc/en/api/api_filedata.md
parent48cec945051d259a06871d937ad998a1bd3e22ec (diff)
downloadvolse-hubzilla-7c34a3676d294c9a1acc69f71ab3061074509160.tar.gz
volse-hubzilla-7c34a3676d294c9a1acc69f71ab3061074509160.tar.bz2
volse-hubzilla-7c34a3676d294c9a1acc69f71ab3061074509160.zip
Rework Help module + begin tests for Setup module
Diffstat (limited to 'doc/en/api/api_filedata.md')
-rw-r--r--doc/en/api/api_filedata.md66
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/en/api/api_filedata.md b/doc/en/api/api_filedata.md
new file mode 100644
index 000000000..1d46a495c
--- /dev/null
+++ b/doc/en/api/api_filedata.md
@@ -0,0 +1,66 @@
+API filedata
+=============
+
+Provides the ability to download a file from cloud storage in chunks
+
+GET /api/z/1.0/filedata
+
+
+Required:
+
+ - file_id
+ attach.hash of desired file ('begins with' match)
+
+
+Optional:
+
+ - start
+ starting byte of returned data in file (counting from 0)
+
+ - length
+ length (prior to base64 encoding) of chunk to download
+
+
+Returns:
+
+ attach (DB) structure with base64 encoded 'content' comprised of the desired chunk
+
+
+
+Example:
+
+ https://xyz.macgirvin.com/api/z/1.0/filedata?f=&file_id=9f5217770fd&start=0&length=48
+
+Returns:
+
+ {
+
+ "attach": {
+ "id": "107",
+ "aid": "1",
+ "uid": "2",
+ "hash": "9f5217770fd55d563bd77f84d534d8e119a187514bbd391714626cd9c0e60207",
+ "creator": "pgcJx1IQjuPkx8aI9qheJlBMZzJz-oTPjHy3h5pWlOVOriBO_cSiUhhqwhuZ74TYJ8_ECO3pPiRMWC0q8YPCQg",
+ "filename": "pcxtopbm.c",
+ "filetype": "application/octet-stream",
+ "filesize": "3934",
+ "revision": "0",
+ "folder": "",
+ "flags": "0",
+ "is_dir": "0",
+ "is_photo": "0",
+ "os_storage": "1",
+ "os_path": "",
+ "display_path": "",
+ "content": "LyogcGN4dG9wYm0uYyAtIGNvbnZlcnQgUEMgcGFpbnRicnVzaCAoLnBjeCkgZmls",
+ "created": "2016-07-24 23:13:01",
+ "edited": "2016-07-24 23:13:01",
+ "allow_cid": "",
+ "allow_gid": "",
+ "deny_cid": "",
+ "deny_gid": "",
+ "start": 0,
+ "length": 48
+ }
+
+ } \ No newline at end of file