Forum
 
 
Knowledge Base Forum
To post messages on the forum, you need to login first.
SearchForum Home
  Product Forums  smartDBforms.NET  Uploading files...
 Uploading files to folder
 
 6/5/2007 11:02:25 AM
Meister
1 posts


Uploading files to folder

I saw that the demo site allows uploading of images to the database binary columns. I need a slightly different functionality.

Do you support the case when the database stores only the file name while the file data is uploaded to a folder?

 6/7/2007 3:08:36 PM
Adillis Support
27 posts
adillis.com


Re: Uploading files to folder
Dear Meister,

This is possible by using the FileNameFromDiskTemplate template. Each SmartDBControl uses on of the available templates in order to render the proper user interface. The predefined templates are described in the online documentation.

The FileNameFromDiskTemplate template works with string database columns. In the database column it stores the name of the file, while the file itself is saved in a predefined virtual folder. The folder is specified in the appSettings section of Web.config. For example:
<appSettings>
<add key="SDBF_UploadDirectory" value="~/UploadDir/"/>
</appSettings>

The FileNameFromDiskTemplate template is not included in the auto template selection method, so you have to set it explicitly in the corresponding SmartDBControl:
1. Open the aspx page in design mode
2. Find the SmartDBControl which handles the fiel name string database column
3. Open the smart-tag panel and change the value of the TempalteID dropdown from (Auto) to FileNameFromDiskTemplate.

You can also modify the automatic template selection to use the FileNameFromDiskTemplate template when appropariate.

If you have any other questions, we will be more than happy to help you.
Best wishes,
Adillis Support
Adillis - IT solutions http://adillis.com
  Product Forums  smartDBforms.NET  Uploading files...
Copyright 2006-2008 Adillis Terms Of Use Feedback Contact Us