Answer the question
In order to leave comments, you need to log in
Is it acceptable to upload, send in the form of a file along with the text?
There is a web page with fillable fields, the data from which is sent to the server after clicking on the button. You need to add the ability to send files. It is desirable that everything is sent at once after one click. What is the best way to do this? Would the following code work:
<form id="TextOfArticle" method="post" action="SaveArticleInfo" enctype="multipart/form-data">
<textarea name="Title">Заглавие</textarea>
<textarea name="Text">Текст</textarea>
<textarea name="Comment">Текст комментария</textarea>
<input type="file" name="uploadedimage" accept="image/jpeg"/>
<button type="submit" form="TextOfArticle" href="#bottom" >Send article</button>
</form>
Answer the question
In order to leave comments, you need to log in
You can do this, you can use scripts differently. When you are programming the cloud file storage web interface, you will think about other approaches. If you want to learn different methods of downloading files - google and study materials, do tests. Well, if you need to send a file to the server for a specific task, you have completed this task. If you are studying - I offer you another task. Send an unknown number of files to the server with one click of a button.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question