R
R
Rustam2015-03-21 10:34:02
bash
Rustam, 2015-03-21 10:34:02

How curl works with checkbox?

People help me figure it out.
In general, the situation is this. I'm trying to upload a file to the server using curl.
I can't figure out how to mark the checkbox.
Already tried everything. public=1, public=true, public=on.
Without the public field, it loads normally, but with it, the HTML "exhaust" is simply issued and that's it.
Has anyone come across such a situation?

$  curl -F '[email protected]' -F 'comment=blabla' -F 'public=on'  http://example.com/upload.php

<form action="upload.php" method="post" enctype="multipart/form-data">
        <textarea name="comment" required placeholder="Ваш комментарий" ></textarea><br>
        <input type="file" name="uploadfile"><br />
        <input type="checkbox" name="public" value="1">Public<br />
        <input type="submit"  value="Загрузить">
</form>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question