usememos / memos

An open-source, lightweight note-taking solution. The pain-less way to create your meaningful notes. Your Notes, Your Way.
https://usememos.com
MIT License
34.06k stars 2.47k forks source link

Failed to set up resources #3494

Closed JakeLaoyu closed 4 months ago

JakeLaoyu commented 5 months ago

Describe the bug

I use curl to set the file resource, but it doesn't seem to take effect.

image

Steps to reproduce

curl --location --request PATCH 'http://127.0.0.1:5230/api/v1/memos/54/resources' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6InYxIiwidHlwIjoiSldUIn0.eyJuYW1lIjoiIiwiaXNzIjoibWVtb3MiLCJzdWIiOiIxIiwiYXVkIjpbInVzZXIuYWNjZXNzLXRva2VuIl0sImV4cCI6NDg3MDgxOTk1MSwiaWF0IjoxNzE3MjE5OTUxfQ.Wa5Cz5DA1Yj9WO3iOP6aI_KcD1l3yoDOKrbn0QjW1qI' \
--header 'Content-Type: application/json' \
--data '{
    "resources": [
    {
    "name": "resources/33",
    "uid": "kRYrPznrSK64SBfJpMXpq9",
    "createTime": "2024-06-01T08:32:37Z",
    "filename": "16pic_8925252_b.jpg",
    "content": "",
    "externalLink": "",
    "type": "image/jpeg",
    "size": "204070"
}
]
}'

The version of Memos you're using

0.22.0

Screenshots or additional context

No response

JakeLaoyu commented 4 months ago

@boojack When will it be released?