mirror of
https://github.com/glitternetwork/pinme.git
synced 2026-09-21 04:46:36 +08:00
feat: update version 1.0.3
This commit is contained in:
+2
-1
@@ -129,4 +129,5 @@ export default async (options?: UploadOptions): Promise<void> => {
|
||||
console.error(chalk.red(`error executing: ${error.message}`));
|
||||
console.error(error.stack);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -112,10 +112,9 @@ async function uploadDirectory(directoryPath: string, deviceId: string): Promise
|
||||
filename: file.name,
|
||||
});
|
||||
});
|
||||
formData.append('uid', deviceId);
|
||||
|
||||
const spinner = ora(`Uploading ${directoryPath} to glitter ipfs...`).start();
|
||||
const response = await axios.post<IpfsResponse['data']>(`${ipfsApiUrl}/add`, formData, {
|
||||
const response = await axios.post<IpfsResponse['data']>(`${ipfsApiUrl}/add?uid=${deviceId}&cidV=1`, formData, {
|
||||
headers: {
|
||||
...formData.getHeaders(),
|
||||
},
|
||||
@@ -162,10 +161,9 @@ async function uploadFile(filePath: string, deviceId: string): Promise<string |
|
||||
formData.append('file', fs.createReadStream(filePath), {
|
||||
filename: filePath.split(path.sep).pop() || '',
|
||||
});
|
||||
formData.append('uid', deviceId);
|
||||
|
||||
const spinner = ora(`Uploading ${filePath} to glitter ipfs...`).start();
|
||||
const response = await axios.post<IpfsResponse['data']>(`${ipfsApiUrl}/add`, formData, {
|
||||
const response = await axios.post<IpfsResponse['data']>(`${ipfsApiUrl}/add?uid=${deviceId}&cidV=1`, formData, {
|
||||
headers: {
|
||||
...formData.getHeaders(),
|
||||
},
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pinme",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user