Iron Speed Technical Forums
Sign up Latest Topics

  Author   Comment  

Posts: 3
Reply with quote  #1 
Hey Gang,

Just bought and built first app. The first big issue for me is that the images I need to show (image review and deletion is a major piece of required functionality) are saved in database as filenames and stored on the server, and not blobs in the database itself.

IS is just showing the filename, how do I get it to show the image? Customization only or is there a setting somewhere I am missing?

Searched for this topic before posting, sorry if duplicate.


Posts: 3
Reply with quote  #2 
Okay, found where I can set the control type to image.  But not sure how to set path before the filename, meaning i need ~/xx/xx/then the filename in the db.  Will press on.

Avatar / Picture

Iron Speed MVP
Posts: 556
Reply with quote  #3 
Hi Mike

Iron speed actually stores them in the db as a blob. You need to of course create a field that is type Image or Varbinay(Max). ISD will then create a fileupload and image control on the page so you can upload and see the result (assuming gif, jpeg etc).  No work needed on your part which is good.
If you add a filename field to your db, you can link this to the upload field in ISD so that ISD will store the filename in this field for you. This is not needed and plays no part in where the file is stores (its stored in the db).

You can if required store the files in the filesystem instead of the db but that requires some work. 


Tim Titchmarsh Iron Speed Consultant MVP
London UK based
+44 (0)1621 835002

Posts: 3
Reply with quote  #4 
The database is already in production, and sits on azure.  Azure also holds the image files, with a guid.jpg naming scheme.  They are in a folder on azure, and the filename is in the db.  Did the following code customization to the PublicOverridesSub SetImageID1()to get the images to show in the edit-image-table.aspx page:

Dim selectedValue AsString = Me.DataSource.ImageID.ToString()

Dim filter2 As CompoundFilter = New CompoundFilter(CompoundFilter.CompoundingOperators.And_Operator, Nothing)

Dim whereClause2 As WhereClause = New WhereClause()

filter2.AddFilter(New BaseClasses.Data.ColumnValueFilter(ImageTable.ImageID, selectedValue, BaseClasses.Data.BaseFilter.ComparisonOperator.EqualsTo, False))

whereClause2.AddFilter(filter2, CompoundFilter.CompoundingOperators.And_Operator)

Dim rc() As ImageRecord = ImageTable.GetRecords(whereClause2, New OrderBy(False, False), 0, 1)

Dim itemValue As ImageRecord = DirectCast(rc(0), ImageRecord)

Dim cvalue AsString = Nothing

Dim fvalue AsString = Nothing

cvalue = itemValue.ImageID.ToString()

fvalue = itemValue.Format(ImageTable.FileName)

Me.ImageID1.ImageUrl = "" & fvalue

Did I do this "the right way"?  It does work.
Also, I want to do this with an image gallery page, but cannot find where the images are linked as they were in this code block.  Any ideas?
Previous Topic | Next Topic

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement