Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreMobile Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 28th, 2005, 03:19 PM
bawaite bawaite is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 84 bawaite User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 50 m 45 sec
Reputation Power: 5
Uploading Images using WAP and Coldfusion from camera phone

I am trying to make a photo gallery to allow people to upload images from there camera phone to a photo gallery system on a website, so far I have been able to update the database with the information, but I have been unable to upload the image using the cffile tag.

wap_image_upload.cfm
Code:
<cfcontent type="text/vnd.wap.wml">
<wml>
	<card title="Upload Image">
		<p>Name:<input type="text" name="name" size="15"/></p>
		<p>Image: <input type="file" name="phone_image"/></p>
		<p>Caption:<input type="text" name="caption" size="15"/></p>
		<do type="accept" label="Upload">
			<go href="post_image.cfm" method="post" ENCTYPE="multipart/form-data"/>
			<postfield name="name" value="$(name)"/>
			<postfield name="phone_image" value="$(phone_image)"/>
			<postfield name="caption" value="$(caption)"/>
		</do>
	</card>
</wml>


post_image.cfm
Code:
	<cfcontent type="text/vnd.wap.wml">
<wml>
	<card>
	<cffile action="upload" filefield="phone_image" destination="#ExpandPath('..\images\cell_gallery\')#" nameconflict="makeunique">
	<cfset new_photo1 = '#File.ServerFile#'>
	<cfset nyear = #Year(Now())#>
	<cfset nmonth = #Month(Now())#>
	<cfset nday = #Day(Now())#>

	<cfset ndate = #CreateDate(nyear, nmonth, nday)#>

	<cfquery name="NewOne" datasource="photos">
	INSERT into public_images 
	(CatID, thumb_image, caption, ndate, submiteed_by, Approved) values
	(12,  '#new_photo1#', '#caption#', #ndate#, '#name#', 0)
	</cfquery>
	Thank you: <cfoutput>#name#</cfoutput>
	Your image has been uploaded.
	</card>
</wml>


when I try to load the post_image.cfm I get a 500 error message.

Any Suggestions

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > Uploading Images using WAP and Coldfusion from camera phone


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway