File uploading using GET Method

后端 未结 2 1348
悲哀的现实
悲哀的现实 2020-11-29 06:30

As we all know, file uploading is most often accomplished using POST method. So, why can\'t the GET method be used for file uploads instead? Is the

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-29 07:02

    In case of GET Method

    1. Appends form-data into the URL in name/value pairs and length of URL is limited(3000 characters).
    2. File content can't be put inside a URL parameter using a form.So use POST
    3. In Get method, the value of action, appends a `?' to it, then appends the form data set, encoded using the "application/x-www-form-urlencoded" content type. The user agent then traverses the link to this URI. In this scenario, form data are restricted to ASCII codes.

    So, that file upload is not possible in GET Method

提交回复
热议问题