cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim ALKHADER <karim.alkha...@wanadoo.fr>
Subject Re: Problem with picture upload
Date Mon, 02 Aug 2004 13:36:21 GMT
Hi Tibor

I didn't have problems with "image/bmp", but if it's a validation problem it may be due to
your browser... (no problem with IE 6).
Anyway here is my model :

<?xml version="1.0"?>
<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
  <fd:widgets>  

    <fd:field id="name">
      <fd:datatype base="string"/>
      <fd:label>Name : </fd:label>
      <fd:hint>Name on the server</fd:hint>
    </fd:field>
    
    <fd:upload id="uploadFileName" mime-types="image/gif, image/bmp, image/pjpeg, image/png"
>
      <fd:label>File to upload : </fd:label>
      <fd:hint>Local name</fd:hint>
    </fd:upload>

   <fd:submit id="upload" action-command="upload">
     <fd:label>Upload</fd:label>
   </fd:submit>

  </fd:widgets>
</fd:form>

Hope this helps.

Karim

PS : I still have trouble with png pictures, it's not really important for me but if somebody
knows what can be wrong...



> HI Karim
> You seem to have managed to make the mime-type validation work for image
> types, I'd be really gratefull if you could post your upload widget model
> declaration, coz I can't seem to pass the validation for neither formats,
> even image/bmp bugs. ??? 
> (my declaration : )
> Sorry for disturbing
> Thank you 
> Tibor
> 
> Karim ALKHADER wrote:
> 
> > 
> >> Karim,
> >> 
> >> add image/pjpeg to the mime-types list. ie 6 uses this mime type for
> >> jpeg images.
> >> does that help?
> > 
> > Yes !
> > Thank you.
> > 
> >> 
> >> Regard
> >> Johannes
> >> 
> >> Karim ALKHADER wrote:
> >> 
> >> >>Hello,
> >> >>
> >> >>You 're rigth Joose.
> >> >>I just forgot to mentioned I tried this way.
> >> >>And it's only working fine with bmp and jpeg.
> >> >> 
> >> >>
> >> >
> >> >Sorry : it's only working fine with bmp and gif, not with jpeg ang png
> >> >!!!
> >> > 
> >> > 
> >> >
> >> >>Regards
> >> >>
> >> >>Karim
> >> >>
> >> >>
> >> >> 
> >> >>
> >> >>>Hi,
> >> >>>
> >> >>>why not just put mime-type="image/png, image/jpeg, image/gif,
> >> >>>image/bmp" ?
> >> >>>
> >> >>>- Joose
> >> >>>
> >> >>>30.7.2004 kello 11:18, Karim ALKHADER kirjoitti:
> >> >>>
> >> >>>Hello
> >> >>> 
> >> >>>
> >> >>>>I made a mistake : mime-types="image/*" doesn't seem to work
at
> >> >>>>all... (is it supposed to?)
> >> >>>>Anyway it's still strange for jpeg or png pictures.
> >> >>>>Is there somebody who have experienced this?
> >> >>>>
> >> >>>>Thanks
> >> >>>>
> >> >>>>Karim
> >> >>>>
> >> >>>> 
> >> >>>>
> >> >>>>>Hello
> >> >>>>>
> >> >>>>>I'm using Cocoon 2.1.5, I' ve got trouble with CForm widget
upload
> >> >>>>>with pictures.
> >> >>>>>In the upload form model if I have :
> >> >>>>>
> >> >>>>>- ok with bitmap
> >> >>>>>pictures, doesn't work with jpeg, gif and png ("upload invalid
> >> >>>>>type") - .... mime-types="image/bmp" -> ok for bitmap
> >> >>>>>- .... mime-types="image/jpeg" -> doesn't work for jpeg
pictures
> >> >>>>>- .... mime-types="image/gif" -> ok for gif
> >> >>>>>- .... mime-types="image/png" -> doesn't work for png
> >> >>>>>
> >> >>>>>I really have no idea of what can be wrong !!!
> >> >>>>>Thanks for any help.
> >> >>>>>
> >> >>>>>Regards
> >> >>>>>
> >> >>>>>Karim
> >> >>>>> 
> >> >>>>>
> >> >>>>---------------------------------------------------------------------
> >> >>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >> >>>>For additional commands, e-mail: users-help@cocoon.apache.org
> >> >>>>
> >> >>>>
> >> >>>> 
> >> >>>>
> >> >>>--
> >> >>>"Always remember that you are unique, just like everyone else!"
> >> >>>* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
> >> >>>
> >> >>>
> >> >>>---------------------------------------------------------------------
> >> >>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >> >>>For additional commands, e-mail: users-help@cocoon.apache.org
> >> >>>
> >> >>>
> >> >>> 
> >> >>>
> >> >>---------------------------------------------------------------------
> >> >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >> >>For additional commands, e-mail: users-help@cocoon.apache.org
> >> >>
> >> >>
> >> >> 
> >> >>
> >> >
> >> >---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >> >For additional commands, e-mail: users-help@cocoon.apache.org
> >> >
> >> >
> >> > 
> >> >
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >> For additional commands, e-mail: users-help@cocoon.apache.org
> >> 
> >>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message