Sophie McCarrell
Sophie McCarrell

Reputation: 2871

Kohana "Call to undefined method Form::upload()"

I have no clue why this would occur. All documentation says the method exists. I'm pretty sure I'm using Kohana 2.3, I only started using it about 4 months ago.

Here is the block of code the issue exists on:

 3 <?=Form::open("admin/project/post/".$project->id)?>
 4  <?=Form::label("git_project_name", "Git Project Name")?>
 5  <?=Form::input("git_project_name", $project->git_project_name)?>
 6  <br />
 7  <?=Form::label("icon_path", "Icon Path")?>
 8  <?=form::upload("icon_local_path", "")?>   //EXCEPTION HERE
 9  <?=Form::input("icon_path", $project->icon_path, " readonly")?>
10  <br />
11  <?=Form::label("product_url", "Product URL")?>
12  <?=Form::input("product_url", $project->product_url)?>
13  <br />

If I remove the mentioned line, things work fine. If upload doesn't exist, what am I supposed to use for uploading files?

Thanks.

Upvotes: 0

Views: 234

Answers (1)

Sophie McCarrell
Sophie McCarrell

Reputation: 2871

Apparently I'm using version 3 and version 3 uses the term "file" not "upload". Silly mistake.

So changing "Form::upload" to "Form::file" fixed my issue :)

Upvotes: 1

Related Questions