Home > Back-end >  Is it possible to set folder path for input type IFormFile
Is it possible to set folder path for input type IFormFile

Time:06-15

I am currently working on a CMS web application. To select images i am using the following code. The input type is IFormFile(BigImage is of type IFormFile)

<div >
 <label  for="inputGroupFile">GroßesBild</label>
 <input  form="addUpdateSubmenu" asp-for="BigImage" id="inputGroupFile">
</div>

Now my question is if it is possible to set a default folder path like: "\abc33\images\bilder" Now it is just opening any folder which was used the latest.

So if i would select an image the directory would look like shown on this screenshot

CodePudding user response:

There is no concept of folder selection in the HTML/JavaScript platform. Even if you could select one, you wouldn't be able to do anything with the folder path. Web applications do not have access to a client's file system.

Here is a similar issue, You can refer to it.

CodePudding user response:

Browsers don't allow you to modify deafault file path(value)of<input type="file"/> due to security issue,the value only changes when you select a file yourself

  • Related