Jump to content

Загрузка файлов по API


MrShandy

Recommended Posts

Попробовал загружать файлы через API, но почему то ругается

Спойлер
{
    "errorCode": "1S303/7",
    "errorMessage": "NO_CATEGEORY"
}

В postman отправлял такой JSON

Спойлер
{"category": 1,
"author": 1,
"title": "Test File",
"description": "Test Description",
"files": {
    "test.txt": "test file for some tests"
    }
}

Оборачивание цифр в кавычки ничего не дало

В headers использовал content type application/json

Категория с ID 1 точно существует, но почему то не работает. Помогите, пожалуйста :)

Link to comment
Share on other sites

https://invisioncommunity.com/developers/rest-api?endpoint=downloads/files/POSTindex

1 час назад, MrShandy сказал:

Оборачивание цифр в кавычки ничего не дало

category - тип int , нужно без кавычек

Link to comment
Share on other sites

20 минут назад, HooLIGUN сказал:

https://invisioncommunity.com/developers/rest-api?endpoint=downloads/files/POSTindex

category - тип int , нужно без кавычек

Пробовал и 1 и "1". Разницы никакой

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Ваша ссылка была автоматически строена.   Отображать как обычную ссылку

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...