Forums

[resolved] [Plugin: PhotoContest Plugin] Foto Upload works not for everyone (7 posts)

  1. rilana
    Member
    Posted 1 year ago #

    I am using 1.4.4 PhotoContest Plugin it works good for me, but when I told other people to upload and join the contest they are having trouble uplaoding images. It gives the error file not supported. It saves the original File in the contest_holder/contest File, but does not create thumb files and so on. I thaught it could have something to do with the permissions. So I set the contest_holder to 755 the images have a 644 right. Are there any other rights I should check. Up till now the problem only acured from PC's not mac dont know if that matters. Please help! I would greatly aprechiate it!

  2. rilana
    Member
    Posted 1 year ago #

    OK I finaly figured it out since it take part of the e-mail Address to create the other size images for thumb view, some of the images ended up having names like rita.mueller.jpg, so when it checked for the image format it give an error saying wrong format, since it checks after the first dot. So all the people who had e-mail Adresses with a . in bevor the @ would get en error wrong file- Format. I fixed it like that:

    { $user_id = 0;
       //this is the fix
        $user_punkt = substr($upload_email, 0, strpos($upload_email,'.'));
        $user_login = substr($user_punkt, 0, strpos($user_punkt,'@'));
       // And this was the original line:
       //$user_login = substr($upload_email, 0, strpos($upload_email,'@'));
    }

    You find it in play.php

  3. frekel
    Member
    Posted 1 year ago #

    I will include this in the next release!!

    Thanks for helping out. I really love people fixing their own reports ;)

    Greets,
    Frank

  4. frekel
    Member
    Posted 1 year ago #

    Better is to check for the last . (dot) when checking the extention:

    Change:
    list(, $this->extension) = explode('.', $this->originalFilename);

    to

    $_extention_array = explode('.', $this->originalFilename);
    $this->extension  = array_pop($_extention_array);

    You will find this in lib/thumbnail.class.php (around line 60!)

    Greetz,
    Frank

  5. frekel
    Member
    Posted 1 year ago #

    Note: Untested, so if someone wants to test it and report the results..... PLEASE!!

  6. frekel
    Member
    Posted 1 year ago #

    Hi there,
    well, not 100%: I see file on server, I do not get previous error but thumbnails for recent uploads are not populated somehow.
    I think the problem is those thumbnails are losing consistency in filename structure:
    let's say I am uploading some random jpg using username 'm.k.r' then
    original file maintains m.k.r at the very beginning of a filename but thumbnails get 'pre_m.JPG' and 'med_m.JPG'
    Basically username is gone from filename and also original jpg's name :(

    cheers,
    Martin

  7. frekel
    Member
    Posted 1 year ago #

    Version 1.5.1 should finally fix this problem!!

    NOTE:
    Reminder about autoupgrading:
    ===========================================================================
    Autoupgrading can remove all my contests and files.
    Please make sure you have a copy of the contest_folder and the skin folder!

Topic Closed

This topic has been closed to new replies.

About this Topic