Skip to content Skip to sidebar Skip to footer

What Does Webkitformboundary Mean?

I'm doing a file upload using https://github.com/danialfarid/ng-file-upload but I don't understand whether I'm actually sending the file or not. The payload just says: ------WebKit

Solution 1:

Each item in a multipart message is separated by a boundary marker. Webkit based browsers put "WebKitFormBoundary" in the name of that boundary.

The Network tab of developer tools do not show file data in a multipart message report: They can be too big.

Use a tool like Charles Proxy to watch the request instead if you want to monitor exactly what is in there.

Solution 2:

That is the payload of the temporary image or document in post method. You can access the above code using php.

<?php

  print_r($_FILES); // to print the file type params$target_dir = "/var/www/html/me_docs/";
  $date = date_create();
  $timestamp = date_timestamp_get($date);

  $filename = pathinfo($_FILES["filepond"]["name"],PATHINFO_FILENAME);
  $extension = pathinfo($_FILES["filepond"]["name"],PATHINFO_EXTENSION);
  $fullname = $filename.'_'.$timestamp.'.'.$extension; 

  $target_file_name = $target_dir.$fullname;

  if(move_uploaded_file($_FILES["filepond"]["tmp_name"], $target_file_name))
  {     
    echo"moving file success";
  }
  else
  {
    echo"failed moving file";
  }

I hope it is useful for someone, Thank you.

Post a Comment for "What Does Webkitformboundary Mean?"