fix(cli): use PDS-returned blob mimeType after upload 39bcdcc8
Local mimeType from filename extension can disagree with the stored blob
when PDS dedupes (same CID, original mimeType wins). Record then
references the blob with wrong mimeType and PDS rejects publish. Trust
uploadBlob response for mimeType and size.
Steve · 2026-05-23 15:17 1 file(s) · +4 −3
packages/cli/src/lib/atproto.ts +4 −3
174 174
			},
175 175
		);
176 176
177 +
		const blob = response.data.blob;
177 178
		return {
178 179
			$type: "blob",
179 180
			ref: {
180 -
				$link: response.data.blob.ref.toString(),
181 +
				$link: blob.ref.toString(),
181 182
			},
182 -
			mimeType,
183 -
			size: imageBuffer.byteLength,
183 +
			mimeType: blob.mimeType,
184 +
			size: blob.size,
184 185
		};
185 186
	} catch (error) {
186 187
		console.error(`Error uploading image ${imagePath}:`, error);