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

  • Home
  • SEARCH
  • 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 8274613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:46:36+00:00 2026-06-08T07:46:36+00:00

The following function keeps telling me that I have uploaded the wrong filetype even

  • 0

The following function keeps telling me that I have uploaded the wrong filetype even though I am definately uploading a PDF file – can anyone suggest what is going wrong?

// output of the var_dump's
$this->upload->data() (array)
file_name   brochure.pdf
file_type   [empty string]
file_path   D:/Shared/Web Sites/site-dev/documents/
full_path   D:/Shared/Web Sites/site-dev/documents/brochure.pdf
raw_name    brochure
orig_name   [empty string]
client_name brochure.pdf
file_ext    .pdf
file_size   369498
is_image    FALSE
image_width [empty string]
image_height    [empty string]
image_type  [empty string]
image_size_str  [empty string]

$data (array)
error   

The filetype you are attempting to upload is not allowed.

function do_upload()
{
    $config['upload_path'] = './documents/';
    $config['allowed_types'] = 'pdf|doc';

    $this->load->library('upload', $config);

    if ( ! $this->upload->do_upload('File'))
    {
        $data = array('error' => $this->upload->display_errors());
                    var_dump($this->upload->data());
                    var_dump($data);exit;
        //$this->load->view('upload_form', $error);
    }
    else
    {
        $data = array('upload_data' => $this->upload->data());

        //$this->load->view('upload_success', $data);
    }

    return $data;
} 
  • 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-06-08T07:46:37+00:00Added an answer on June 8, 2026 at 7:46 am

    Fixed – problem with 2.1 (see my post above)

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

Sidebar

Related Questions

The following module keeps failing for me, telling me that an object of type
The following function rewrites urls from news and product titles that contain all sorts
The following function that reports the current line-number (and time) which I would like
I have the following function/constructor/method (I'm not sure exactly what it is) List<T>& List<T>::operator=(const
The following program keeps crashing and I can't figure out what's wrong. It seems
I have the following : <script> $().ready(function() { $(#myVal#).blur(function() { var arr = jQuery.makeArray(
I have a class that keeps data stores/access data by using words.separated.by.dots keys and
When debugging a VB6 application, I have noticed that the VB6 IDE keeps any
Take a gander at the following code. Basically, this is a function that gets
I must have some permissions wrong, but I can't figure out how. The following

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.