If a user uploads, say a company logo, how can they re-use it a later date on another record?
If a user uploads, say a company logo, how can they re-use it a later date on another record?
Regards
Keith Hubert
Alpha Guild Member
London.
KHDB Management Systems
Skype = keith.hubert
For your day-to-day Needs, you Need an Alpha Database!
I don't know if this will help, but my customers can upload a company logo that I've been referencing in other places. I have a table that holds their company info (name, address, etc.) and I added a field named company_logo_ref . I have a button on their company info grid that opens a file upload window. On the file upload genie, I tell it to use the company_logo_ref field to store the fully qualified path (folder path and file name). I have an access sql back end database, so in my sql queries for other grids or reports that need to display the company logo, I include the company_logo_ref field from the company table. To display that logo on a grid, you will need to set the display format to the Special Format of Image File Reference Field. On reports, I've had to edit the SQL Datasource, use Advanced Options, then Overide Field Definitions Of Selected Fields and set that field to an Image File Reference type of field in order to display the logo.
I created an upload page. Client uploads the logo into a logo database. Once uploaded, client is directed to another page allowing him to modify the size (width and height) to his satisfaction. I do set limitations here. This dimension information is in the logo database. To display the logo, I created a page "logodisplay.a5w" with the following:
dim gName as c = alltrim(lookup("[pathalias.adb_path]\logos","ssn="+quote(ssn),"coname"))
dim gHeight as c = lookupc("F",alltrim(ssn),alltrim("height"),"[pathalias.adb_path]\logos","ssn")
dim gWidth as c = lookupc("F",alltrim(ssn),"width","[pathalias.adb_path]\logos","ssn")
dim gLogo as c = lookupc("F",alltrim(ssn),"name","[pathalias.adb_path]\logos","ssn")
? "<center><img border=0 src=http://socialservicenetwork.com/logos/"+urlencode(gLogo)+" height="+quote(gHeight)+"width="+quote(gWidth)+"alt="+quote(gName)+"></center>"
Any page I wish to display client's logo, I place a5w_include("logodisplay.a5w") in it.
Note: Even though I did, I think you don't have to dim the variables here.
Eric
Alpha Five Websites
longlivepuppies.com
socialservicenetwork.com
-------------------------------------------------
socialservicenetwork.org
Thanks for suggestions.
What I failed to mention is that I would be using the Upload Image feature pack.The idea behind my question when starting this thread was to find a way of not having to make the user upload the same image each time they made a new HTML memo record.In addition, if you have this feature pack installed, then when you are editing memo fields in the Grid using the HTML editor, a new icon appears in the HTML editor toolbar allowing you to upload images to the server and insert them into the editor.
Regards
Keith Hubert
Alpha Guild Member
London.
KHDB Management Systems
Skype = keith.hubert
For your day-to-day Needs, you Need an Alpha Database!
Bookmarks