Fix upload code examples

This commit is contained in:
Marcin S 2020-10-19 13:13:58 +02:00
parent f9722f2974
commit d4ecc5647f
No known key found for this signature in database
GPG Key ID: 68A476F4791BB6B3
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