Merge pull request #485 from NebulousLabs/fix-upload-code-examples

Fix upload code examples
This commit is contained in:
Ivaylo Novakov 2020-10-19 13:35:22 +02:00 committed by GitHub
commit 7a40499ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
export const curl = `# upload
curl -X POST "https://siasky.net/skynet/skyfile" -F file=@src.jpg
curl -X POST "https://siasky.net/skynet/skyfile" -F "file=@src.jpg"
# download
curl "https://siasky.net/[skylink]" -o dst.jpg`;
@ -14,7 +14,7 @@ const client = new SkynetClient();
async function example() {
try {
// upload
const { skylink } = await client.uploadFile(file);
const skylink = await client.uploadFile(file);
console.log(\`Upload successful, skylink: \${skylink}\`);
// download