Hi, folks!
Can somebody help me with 6 stupid lines of code?
<cfsetting enablecfoutputonly="Yes" showdebugoutput="No">
<cfquery datasource=#dsn# name="get_picture">
select Picture, mime_type from my_table where id='#url.pict#'
</cfquery>
<cfcontent type=#get_picture.mime_type[1]#>
<cfoutput>#get_picture.picture[1]#</cfoutput>
In the code listed above I try to retrieve image stored
in the database this way
<cffile action="UPLOAD"
destination=#file_folder#
filefield="picture"
accept="image/gif, image/jpeg, image/pjpeg"
nameconflict="MAKEUNIQUE">
<cfset path_and_file=file_folder&ServerFile>
<cffile action="READBINARY" file=#path_and_file# variable="picture_bin">
<cfquery datasource=#dsn#>
insert into my_table (picture,mime_type)
values ('#toBase64(picture_bin)#', '#ContentType#/#ContentSubType#')
</cfquery>
All is pretty simple BUT it don't work for unknown reason!
Problem is in the retrieving but I can't fix it!
Can somebody help me?
--
Regards,
Alex mailto:[EMAIL PROTECTED]
May all your Internet Dreams come true!
http://www.intellinetusa.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists