Home > Software design >  Is it possible to insert an image filename into a fileupload when webform is opened?
Is it possible to insert an image filename into a fileupload when webform is opened?

Time:09-14

I was wondering if it is possible to insert the filename of an image on the fileupload when a webform is opened.

For example, I run the program and the fileupload already have a filename of Image_Name.jpg on it to indicate that it already has a file without clicking the Choose File Button.

enter image description here

CodePudding user response:

No, you can't do this - it is not allowed.

I mean, if we could do this, then when you come to my site to view a cute cat picture?

Then I'll go looking around on YOUR computer, and upload a file called my banking, or my passwords or whatever.

So, you can't set the file name. And in fact, EVEN when a user goes to select a file name? when they post the page (to up-load), then you ONLY get the file name. You don't even (and can't even) get the local path name.

On the other hand, might be a smartphone, and that don't even have a drive c:, and on some tablet OS, they don't even have path names similar to windows.

So, this is 100% HANDS OFF MY computer!!!

You can't set a file name, you can't choose a file name for the user. If you could do this, then not only could you mess around and grab files form my computer?

No one would ever use the internet again - since it would be too high risk and too dangerous.

  • Related