Importing a JSON file (or even the same JSON file converted to CSV) gives me the failed to import file error. The problem is this was working before with no problems, using the same file I’m trying to use now. It’s not related to the file or structure as far as I can tell since it errors out with multiple different files, including the example JSON structure that I found posted on this issue:
[
{
"collection": "testcollection",
"key": "testkey",
"user_id": "fb912423-82cb-4e3a-8f67-42c37be19a3c",
"value": "{\"hello\": \"world\"}",
"permission_read": 2,
"permission_write": 1
},
{
"collection": "testcollection",
"key": "testkey2",
"user_id": "9e997e08-7e81-4d3b-a3d3-3458f7c5e5e1",
"value": "{\"hello\": \"world\"}",
"permission_read": 1,
"permission_write": 1
}
]
We’ve obviously changed user_id
to match any of our user_ids, as well as tried the system user_id with the same result. Yesterday I started having this issue, while another developer was able to import the file that was causing my error on his installation no problem. Today he’s having the same issue. What is happening here?
Here’s one of the files we’re testing with now:
[
{
"collection": "AttackMoves",
"key": "Scorch",
"user_id": "00000000-0000-0000-0000-000000000000",
"value": "{\"energyCost\":10,\"power\":10, \"variance\":1.5, \"levelRequired\":4, \"element\":\"Fire\", \"isProjectile\":true}",
"permission_read": 2,
"permission_write": 1
}
]
Since it has been hit or miss whether it works, we’ve resorted to just pushing testing data structures from a client for now, but this isn’t the workflow we want to be stuck with.
Is there something we’re missing? Thanks a ton!
Also, here’s the error response logged in the console:
Response
body: ReadableStream { locked: false }
bodyUsed: false
headers: Headers { }
ok: false
redirected: false
status: 401
statusText: "Unauthorized"
type: "basic"
url: "http://192.168.99.100:7351/v2/console/storage/import?"
<prototype>: ResponsePrototype { clone: clone(), arrayBuffer: arrayBuffer(), blob: blob(), … }
index.tsx:135:18
value index.tsx:135