Я знаю, что этот вопрос задавали и раньше, но моя проблема немного другая.
Я хочу загрузить изображение на сервер PHP, и я хочу отправить больше параметров вместе с изображением из iOS. Я искал в google и нашел два решения:
-
Либо мы отправим изображение как
Base64
закодированную строку вJSON
. Ссылка . -
Или мы загрузим изображение на сервер, используя данные формы. Я ссылался на эту ссылку . Если кто-то называет меня таким образом, то, пожалуйста, помогите мне добавить в этот API больше параметров.
Теперь у меня вопрос, какой из них - лучший способ загрузить изображение на сервер, и мне нужно отправить больше параметров (имя пользователя, пароль и более подробную информацию) в тот же вызов веб-службы.
Спасибо заранее.