Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

php is altering original filename

PHP's $_FILES['send_file']['name'] does not equal Content-Disposition's filename="..." value.

PHP is doing some sanitizing: removes path and stores only name of the file, like it said in documentation:

$_FILES['userfile']['name']

The original name of the file on the client machine.

Removing path means that everything before last slash/backslash (including them) is removed, that's what you got.

Tags:

Php

Escaping

Related

What is the purpose of using --save-exact The output -1 becomes a slash in the loop Unable to login to GitHub Package Registry Tensorflow - ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type float) Exclude pod when porting to mac with catalyst Rune vs byte ranging over string Getting navigation duplicated error while the route is being replaced on Vue-Router React TypeScript get Data Attribute From Click Event SwiftUI - Add Border to One Edge of an Image How do you make plotly error bars follow a colorscale? PyWin32 and Python 3.8.0 How to fix "Failed to pull image" on microk8s

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy