UserInput Image not uploading

Michael_S
Senior Member
Beiträge: 160
Registriert: Mi 4. Feb 2004, 02:39
Wohnort: London / UK
Kontaktdaten:

UserInput Image not uploading

Beitragvon Michael_S » Fr 17. Jan 2014, 15:42

Hi,

I have the following code which works to create the Object but the image is not uploaded?

The code for the form to create the Object with image:

Code: Alles auswählen

<we:form type="object" id="218" name="upload" method="post" target="_self" classid="6">
   <we:userInput type="img" name="Content_Image" thumbnail="Medium" parentid="217" quality="7" keepratio="true" /><br />
   <input type="submit" value="Save" />
</we:form>

The code to write the Object to the database:

Code: Alles auswählen

<we:ifSelf id="218">
   <we:write type="object" formname="upload" publish="true" classid="6" onduplicate="overwrite" forceedit="true" protected="false" />
</we:ifSelf>

Any help appreciated.

Michael.
Production Area
London, UK
http://productionarea.com

ThomasGoebe
Senior Member
Beiträge: 843
Registriert: Mo 26. Jul 2010, 23:44
Wohnort: Hannover
Kontaktdaten:

Re: UserInput Image not uploading

Beitragvon ThomasGoebe » Fr 17. Jan 2014, 17:11

Hi Michael,

please use enctype="multipart/form-data" in your we:form tag. The enctype is needed for file uploads.
Your code should be like this:

Code: Alles auswählen

<we:form type="object" id="218" name="upload" method="post" target="_self" classid="6" enctype="multipart/form-data">
   <we:userInput type="img" name="Content_Image" thumbnail="Medium" parentid="217" quality="7" keepratio="true" /><br />
   <input type="submit" value="Save" />
</we:form>
Thomas Göbe
webEdition Partner aus Hannover
Autor des 1. webEdition Buch (gemeinsam mit Andreas Witt)
web: http://www.twinsystems.de

Michael_S
Senior Member
Beiträge: 160
Registriert: Mi 4. Feb 2004, 02:39
Wohnort: London / UK
Kontaktdaten:

Re: UserInput Image not uploading

Beitragvon Michael_S » Fr 17. Jan 2014, 17:33

Hi Thomas,

Yes, I should have realised that, a simple mistake! Thanks for the help and swift response.

Regards,

Michael.
Production Area
London, UK
http://productionarea.com


Zurück zu „webEdition Basic Version“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast