diff --git a/cli_share_upload_file.ipynb b/cli_share_upload_file.ipynb index 4836f8c..54e2799 100644 --- a/cli_share_upload_file.ipynb +++ b/cli_share_upload_file.ipynb @@ -5,12 +5,13 @@ "metadata": {}, "source": [ "## Example CLI Share (Headless) File Upload\n", - "The following example provides a code snippet for sharing a file via cli share. " + "The following example provides a code snippet for sharing a file via cli share. The CLI Endpoint is only avaiable from the Sandbox.\n", + "### using python" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -18,7 +19,7 @@ "output_type": "stream", "text": [ "uploading file\n", - " {\"PublicUrl\":\"https://share.storage.sandbox.iuk.hdm-stuttgart.de/upload/14e4d841-4023-4960-b326-1a117e858fad/README.md\",\"Size\":93,\"Expiration\":\"2024-10-11T00:00:00Z\"}\n" + " Forbidden\n" ] } ], @@ -36,6 +37,37 @@ "response = requests.post(myurl, files=files)\n", "print(response,response.text)" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### using curl\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "``` curl -F fileUpload=@doc.zip https://share.storage.sandbox.iuk.hdm-stuttgart.de/upload ```" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Response\n", + "\n", + "The respone of both requests includes the public available download link and the expiration date.\n", + "\n", + "\n", + "``` \n", + " { \"PublicUrl\":\"https://share.storage.sandbox.iuk.hdm-stuttgart.de/upload/14e4d841-4023-4960-b326-1a117e858fad/README.md\",\n", + " \"Size\":93,\n", + " \"Expiration\":\"2024-10-11T00:00:00Z\" }\n", + " ``` \n", + "\n" + ] } ], "metadata": {