fix(tandoor): use File constructor for proper multipart uploads

- Remove unreliable URL pass-through strategy (image_url field)
- Always download and upload images as File objects
- Get MIME type from HTTP response headers for URLs
- Use File constructor (not just Blob) for proper multipart metadata
- Add comprehensive error logging with headers and file metadata
- Simplify to single reliable upload path

Fixes 400 'Upload a valid image' error caused by Blob not providing
proper filename/MIME metadata in multipart form data.
This commit is contained in:
Giancarmine Salucci
2025-12-21 05:19:33 +01:00
parent 856c5c26f4
commit cc7b8032cb
4 changed files with 16022 additions and 76 deletions

View File

@@ -5,7 +5,7 @@
"value": "SDRORLyWEsWWty2ZoVGdER",
"domain": ".instagram.com",
"path": "/",
"expires": 1800849269.656302,
"expires": 1800850168.116943,
"httpOnly": false,
"secure": true,
"sameSite": "Lax"
@@ -45,7 +45,7 @@
"value": "59661903731",
"domain": ".instagram.com",
"path": "/",
"expires": 1774065269.656394,
"expires": 1774066168.117026,
"httpOnly": false,
"secure": true,
"sameSite": "None"
@@ -72,7 +72,7 @@
},
{
"name": "rur",
"value": "\"CLN\\05459661903731\\0541797825269:01fe6904bc7d85ccbfea5233062783089ac963caf6202742eb0b112bd5ab4f6ef965e2f4\"",
"value": "\"CLN\\05459661903731\\0541797826168:01fe0c70391c9f4322366f6ea648ca6647818cd2ca16c215419a55558746287e2865245d\"",
"domain": ".instagram.com",
"path": "/",
"expires": -1,
@@ -87,7 +87,7 @@
"localStorage": [
{
"name": "chatd-deviceid",
"value": "11f6cbef-22a3-4c0b-9558-7a83fd40e521"
"value": "0265e9b3-0083-498a-9424-7a08289dfb45"
},
{
"name": "hb_timestamp",
@@ -95,7 +95,7 @@
},
{
"name": "IGSession",
"value": "6m2tlb:1766291070793"
"value": "6m2tlb:1766291968512"
},
{
"name": "pixel_fire_ts",
@@ -107,7 +107,7 @@
},
{
"name": "Session",
"value": "0f4qnx:1766289305793"
"value": "nrg3hr:1766290203512"
},
{
"name": "has_interop_upgraded",