webdevask.com

Menu

  • Home
  • New
  • Add question

javascript - Getting custom file property in file with PHP

View Original

I was wondering if there is a way to get custom properties in file that comes from javascript.

Like this:

enter image description here

This is my file object that goes to server with an ajax request.

When when I print $_FILES in server side I'm only getting default values:

enter image description here

Thanks!

Answer

Solution:

You have to understand how this informations are send to PHP. The superglobal $_FILE only prints form uploaded file informations.

Try to print $_POST and see what you get https://www.php.net/manual/en/reserved.variables.post.php

Source

See also:

  • php สร้าง Google ชีตจากบัญชีบริการ

  • php - Laravel 8.0 Installation Failed

  • javascript - How to include HTML data (tags) as value in "arrayToDataTable" of Google Pie Chart?

  • how to Grouping array in php

  • php - vender folder from my laravel project has more 1k error

© 2021
E-mail: contact@webdevask.com
Back to top