To obtain the filename of a file uploaded using the "multipart/form-data" enctype in a form, you can access the "filename" property of the file object.\n\nHere is an example using JavaScript:\n\njavascript\nconst fileInput = document.getElementById('file-input');\nconst file = fileInput.files[0];\nconst filename = file.name;\nconsole.log(filename);\n\n\nIn this example, "file-input" is the id of the file input element in your HTML form. The "fileInput.files[0]" retrieves the first file selected in the input element, and "file.name" returns the name of the file.\n\nMake sure to replace "file-input" with the actual id of your file input element.

How to Get the Filename from a File Uploaded with multipart/form-data