Fix upload code examples
This commit is contained in:
parent
f9722f2974
commit
d4ecc5647f
|
@ -1,5 +1,5 @@
|
||||||
export const curl = `# upload
|
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
|
# download
|
||||||
curl "https://siasky.net/[skylink]" -o dst.jpg`;
|
curl "https://siasky.net/[skylink]" -o dst.jpg`;
|
||||||
|
@ -14,7 +14,7 @@ const client = new SkynetClient();
|
||||||
async function example() {
|
async function example() {
|
||||||
try {
|
try {
|
||||||
// upload
|
// upload
|
||||||
const { skylink } = await client.uploadFile(file);
|
const skylink = await client.uploadFile(file);
|
||||||
console.log(\`Upload successful, skylink: \${skylink}\`);
|
console.log(\`Upload successful, skylink: \${skylink}\`);
|
||||||
|
|
||||||
// download
|
// download
|
||||||
|
|
Reference in New Issue