cyrus-mcp-tools 0.1.0 → 0.1.2
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.
|
@@ -81,11 +81,17 @@ export function handleUploadFile(linearService) {
|
|
|
81
81
|
const { uploadUrl, headers, assetUrl } = uploadPayload.uploadFile;
|
|
82
82
|
// Step 2: Upload the file to the provided URL
|
|
83
83
|
console.log(`Uploading file to Linear cloud storage...`);
|
|
84
|
-
//
|
|
85
|
-
const uploadHeaders = {
|
|
84
|
+
// Create headers following Linear's documentation exactly
|
|
85
|
+
const uploadHeaders = {
|
|
86
|
+
"Content-Type": contentType,
|
|
87
|
+
"Cache-Control": "public, max-age=31536000",
|
|
88
|
+
};
|
|
89
|
+
// Then add the headers from Linear's response
|
|
90
|
+
// These override any defaults we set above
|
|
86
91
|
for (const header of headers) {
|
|
87
92
|
uploadHeaders[header.key] = header.value;
|
|
88
93
|
}
|
|
94
|
+
console.log(`Headers being sent:`, uploadHeaders);
|
|
89
95
|
const uploadResponse = await fetch(uploadUrl, {
|
|
90
96
|
method: "PUT",
|
|
91
97
|
headers: uploadHeaders,
|
package/package.json
CHANGED
|
@@ -107,11 +107,19 @@ export function handleUploadFile(linearService: LinearService) {
|
|
|
107
107
|
// Step 2: Upload the file to the provided URL
|
|
108
108
|
console.log(`Uploading file to Linear cloud storage...`);
|
|
109
109
|
|
|
110
|
-
//
|
|
111
|
-
const uploadHeaders: Record<string, string> = {
|
|
110
|
+
// Create headers following Linear's documentation exactly
|
|
111
|
+
const uploadHeaders: Record<string, string> = {
|
|
112
|
+
"Content-Type": contentType,
|
|
113
|
+
"Cache-Control": "public, max-age=31536000",
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// Then add the headers from Linear's response
|
|
117
|
+
// These override any defaults we set above
|
|
112
118
|
for (const header of headers) {
|
|
113
119
|
uploadHeaders[header.key] = header.value;
|
|
114
120
|
}
|
|
121
|
+
|
|
122
|
+
console.log(`Headers being sent:`, uploadHeaders);
|
|
115
123
|
|
|
116
124
|
const uploadResponse = await fetch(uploadUrl, {
|
|
117
125
|
method: "PUT",
|