artifact-hub-mcp 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +3 -2
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -225,12 +225,13 @@ server.setRequestHandler(types_js_1.CallToolRequestSchema, async (req) => {
|
|
|
225
225
|
tags: args['tags'],
|
|
226
226
|
contentType: args['contentType'],
|
|
227
227
|
});
|
|
228
|
-
const
|
|
228
|
+
const uploadUrl = `${BASE_URL}/upload?token=${encodeURIComponent(data.token)}`;
|
|
229
|
+
const curlCmd = `curl -s -X POST '${uploadUrl}' -F 'file=@${args['fileLocalPath']}'`;
|
|
229
230
|
return {
|
|
230
231
|
content: [{
|
|
231
232
|
type: 'text',
|
|
232
233
|
text: JSON.stringify({
|
|
233
|
-
uploadUrl
|
|
234
|
+
uploadUrl,
|
|
234
235
|
expiresIn: data.expiresIn,
|
|
235
236
|
curlCommand: curlCmd,
|
|
236
237
|
instruction: 'Run the curlCommand now to upload the file.',
|