file upload type problem (4 posts)

  1. Kelson
    Posted 12 years ago #

    On 0.72 gold, I'm having a problem with allowing file types for file upload. The form says to put a space before and after each type - so " jpg gif png " should work. The problem is that the final space seems to be getting truncated somewhere. Whenever I go back to the config page, it shows up as " jpg gif png" (with no final space) and when I try to upload a file, it only allows jpg and gif.
    I rearranged the line as " jpg png gif " - it still truncates the final space, and now it allows jpg and png but not gif.
    I figure I can put a junk extension in there, or just not upload any gifs. But I suspect the same thing might happen with what users are allowed to upload, because I see the same trailing-space being chomped problem on that line.

  2. Mike Little
    Posted 12 years ago #

    Hi Kelson,
    This looks like it's a MySQL issue. I'm pretty sure I remember MySQL truncating trailing whitespace in varchar columns.
    I've always meant to look into changing the way we parse those lists. I guess it's more urgent now.

  3. otaku42
    Posted 12 years ago #

    The same problem applies to the list of users that are allowed to upload files, by the way.

  4. otaku42
    Posted 12 years ago #

    I submitted a patch along with a bugreport to the sourceforge bugtracker (id #825371). The patch applies for 0.72 gold.
    Bye, Mike

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.