arvindbhardwaj2003 has asked for the wisdom of the Perl Monks concerning the following question:

While uploading a an HTML file, ------WebKitFormBoundarywPhRMi5J1WMEAybu data------WebKitFormBoundarywPhRMi5J1WMEAybu-- get added before tag, causing to display the above when we open the HTML page. i am using LWP with perl to uplaod the file:
my $req = POST( $url, Authorization => 'Basic ' . encode_base64('admin' . ':' . '*****') +, Content_Type => 'multipart/form-data', 'Content' => { 'file_to_upload' => ["$location"] } );
Can someone explain how to get rid of WebKitFormBoundary in uploaded file ?
  • Comment on While Uploading html file ,“WebKitFormBoundary ” are added at the top of page using perl. How to prevent this?
  • Download Code

Replies are listed 'Best First'.
Re: While Uploading html file ,“WebKitFormBoundary ” are added at the top of page using perl. How to prevent this?
by Anonymous Monk on Sep 16, 2019 at 07:02 UTC

    Can someone explain how to get rid of WebKitFormBoundary in uploaded file ?

    either

    use module/code which understands HTTP / formdata

    or upload using a format your server expects, something that is not formdata