Uploading image


i'm got cool uploading images tutorial asfusion.com. got working issue. created db table called "photos", in photos table made 2 columns named "id" , "images". i'm allowing users login , upload images folder on server. want save name of image uploaded, db column named "images" aswell save user id "id" column. i'm using session.auth.id .

i'm using tabbed cfform this, i'm trying make happen on 1 tab upload field , upload button, on second tab want bind images upload specifc user (called id) cfgrid , display images uploaded user. want associate images of specific user there user id.

how send users id through query string saved db table called photos?

if code incorrect, can lead me in right direction? or there easier way nreed done?

thanks
rob


this upload code:

<cf_flashupload label="picture:" name="myfile2" filetypes="*.jpg;*.png;*.gif" filedescription="image files" actionfile="upload.cfm" maxsize="500">


<cf_flashuploadinput buttonstyle="corner-radius: 10;" inputstyle="fontweight:bold" inputwidth="190" uploadbutton="true" uploadbuttonlabel="upload" choosebuttonlabel="choose file" progressbar="true" progressinfo="true" required="yes" message="please enter valid file upload!" />
</cf_flashupload>

this processing script:

<cfif structkeyexists(form,"filedata")>
<cffile action="upload" filefield="filedata" destination="#expandpath("\uploads")#" nameconflict="makeunique">
</cfif>


<cfquery datasource="#datasource#">
insert photos(images,id)
values('#trim(form.myfile2)#',
('#trim(url.session.auth.id)#')
</cfquery>

add cfinput name whatever db field , use
session.auth.id vaerable value. pass on cfc via
the remoting , insert db.

"infa" <webforumsuser@macromedia.com> wrote in message
news:ee5e7v$mgk$1@forums.macromedia.com...
> i'm got cool uploading images tutorial asfusion.com. got
> working
> issue. created db table called "photos", in photos
> table made 2 columns named "id" , "images". i'm allowing users
> login
> , upload images folder on server. want save name
> of
> image uploaded, db column named "images" aswell save
> user
> id "id" column. i'm using session.auth.id .
>
> i'm using tabbed cfform this, i'm trying make happen on
> 1
> tab upload field , upload button, on second tab want
> bind
> images upload specifc user (called id) cfgrid
> ,
> display images uploaded user. want associate
>
> images of specific user there user id.
>
> how send users id through query string saved db
> table called photos?
>
> if code incorrect, can lead me in right direction? or
> there easier way nreed done?
>
>
> rob
>
>
> upload code:
>
> <cf_flashupload label="picture:" name="myfile2"
> filetypes="*.jpg;*.png;*.gif"
> filedescription="image files" actionfile="upload.cfm" maxsize="500">
>
>
> <cf_flashuploadinput buttonstyle="corner-radius: 10;"
> inputstyle="fontweight:bold" inputwidth="190" uploadbutton="true"
> uploadbuttonlabel="upload" choosebuttonlabel="choose file"
> progressbar="true"
> progressinfo="true" required="yes" message="please enter valid file
> upload!" />
> </cf_flashupload>
>
> processing script:
>
> <cfif structkeyexists(form,"filedata")>
> <cffile action="upload" filefield="filedata"
> destination="#expandpath("\uploads")#" nameconflict="makeunique">
> </cfif>
>
>
> <cfquery datasource="#datasource#">
> insert photos(images,id)
> values('#trim(form.myfile2)#',
> ('#trim(url.session.auth.id)#')
> </cfquery>
>
>




More discussions in ColdFusion and Flash Integrations


adobe

Comments

Popular posts from this blog

opencv3, tbb and rasp pi 2 - Raspberry Pi Forums

small ethernet problem - Raspberry Pi Forums

Multithumb configuration params not working? - Joomla! Forum - community, help and support