Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6141925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:19:03+00:00 2026-05-23T18:19:03+00:00

I have tried several CakePHP file uploaders, but have not been successful’ in setting

  • 0

I have tried several CakePHP file uploaders, but have not been successful’ in setting up and making it work. I’ve settled down with Miles Uploader Plugin and I am doing everything I can to make it work. Installation instructions are excellent and I have followed them to the letter, but I still cant get it to work.

When I post an Article I get the following error:

 Warning (2): Illegal offset type in isset or empty [APP/plugins/uploader/controllers/components/uploader.php, line 1104]
    }
    if (isset($this->_data[$file])) {

I am making the following call in my add articles view

...
echo $form->input('main_image', array('type' => 'file'));
...

And I am using the following in my add action but it is returning false

...
if (!empty($this->data)) {
    //This call is not successful which skips to the }else{ display the message below
    if ($data = $this->Uploader->upload('main_image')) {
        // Upload successful, do whatever
    }else{
            $this->setFlash('Uploader Error',true);
    }
}
...

Can anyone please shed some light on what could possibly be wrong.


** EDIT **


I am not able to try this out right now, but do I need to do the following to make it work:

if ($data = $this->Uploader->upload(data['Article']['main_image'])) {

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:19:04+00:00Added an answer on May 23, 2026 at 6:19 pm

    Spent many hours trying to figure out why it does not work. Finally I gave up last night trying and settled with trying to configure CakePHP’s Media Plugin. That now works great. Setup was a breeze.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried several things so far, but I haven't had much luck yet.
Here is what I have. I have tried several things but I can't figure
I have tried several things but I can't get the MySQL query in my
Can someone convert this english to SQL I have tried several things but no
How can I load a model? I have tried several times but it doesn't
i have tried several methods of trying to extract values from an XML file
I have tried several times now to get cURL to work using xampp, whith
I have tried several methods, but problems always exist. Sometimes the sub-window didn't refresh
I have tried several different ways, but it seems that it never sends the
I have tried several things to get it work. Here is my problem. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.