Skip to main content
Solved

How to load filename without actually uploading a file

  • April 20, 2021
  • 1 reply
  • 37 views

Forum|alt.badge.img+5

Our customer just wants to add a filename to the database without actually uploading the file itself.

I get the impression that if you want to select a file and then retrieve its filename, you automatically have to upload the file.

Is this impression correct? Or how can I get a filename (with or without path) by selecting a file without actually uploading the file?

Best answer by Mark Jongeling

Hi Roy,

To only give in a file name, you'll have to have a non-upload field. The purpose of the upload field is to upload the file itself, not to give in a file name. I suggest creating a new field for it specifically.

A good way to implement what you desire is having a field with the File link domain control. This way you only like the file and not upload it. Even though the file may be inaccessible for others, you could subtract the file name out of that link and place it in another field:

Example file link

 

When the file is uploaded:

It is possible to select the filename of an uploaded file (database storage) in the Grid and the Form (in edit mode). Here the file path is not relevant because it is uploaded as a varbinary in the database.

Selecting the filename

 

The file path of the uploaded file (non-database) can be copied as follows:

Selecting the file path

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3936 replies
  • Answer
  • April 20, 2021

Hi Roy,

To only give in a file name, you'll have to have a non-upload field. The purpose of the upload field is to upload the file itself, not to give in a file name. I suggest creating a new field for it specifically.

A good way to implement what you desire is having a field with the File link domain control. This way you only like the file and not upload it. Even though the file may be inaccessible for others, you could subtract the file name out of that link and place it in another field:

Example file link

 

When the file is uploaded:

It is possible to select the filename of an uploaded file (database storage) in the Grid and the Form (in edit mode). Here the file path is not relevant because it is uploaded as a varbinary in the database.

Selecting the filename

 

The file path of the uploaded file (non-database) can be copied as follows:

Selecting the file path

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings