Jump to content

uploaded file sometimes not recognized


Recommended Posts

Hi there,

I got a template with a field of type "file" in it. If the client did load a file up, a download link is shown - otherwise nothing. 

The templates name is "termin" and the fields name is "termininfo". middlecontent is some string that collects the HTML.

My method to find out, whether a file has been uploaded, is the following:

if ($termin->termininfo) $middlecontent .= "<a href='{$termin->termininfo->url}' target='_blank'>INFO</a>\n";
else $middlecontent .= "<a class='hidden'></a>";

My question is, why in some cases, which i cannot really reproduce, the condition $termin->termininfo is false, although a file has been uploaded. This occurs only in a fresh dataset, where no file has been uploaded previously.

Maybe there is a better way to check for the existence of the uploaded file.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...