⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


File upload error 404


  • Please log in to reply
4 replies to this topic

#1 RSPeres

RSPeres

    Member

  • Members
  • PipPip
  • 12 posts

Posted 18 December 2012 - 01:47 AM

Hi,

I'm trying to upload a file but I just receive an alert: "An error has occurred in upload". Using Firebug I got "POST link_image 404 not found"...

How can I debug this problem? My code:


$this->grocery_crud->add_fields('fk_curso_id','link_nome','link_url','link_image','link_cadastro');

$this->grocery_crud->edit_fields('fk_curso_id','link_nome','link_url','link_image','link_cadastro');

$this->grocery_crud->set_relation('fk_curso_id','tbl_cursos','curso_nome');


$this->grocery_crud->set_field_upload('link_image',$this->config->item('diretorio_thumb_links'));


Thank's in advance


#2 victor

victor

    grocery CRUD Hero

  • Advanced Member
  • PipPipPip
  • 967 posts

Posted 18 December 2012 - 09:30 AM

Hi! show the url to function and base_url.

#3 RSPeres

RSPeres

    Member

  • Members
  • PipPip
  • 12 posts

Posted 18 December 2012 - 02:59 PM

Hi Victor, I resolve the 404 problem adding a new route... but now I'm receive just "abort" as return.

base_url = http://localhost/~rods/drc/

url to the function: http://localhost/~ro...file/link_image

#4 RSPeres

RSPeres

    Member

  • Members
  • PipPip
  • 12 posts

Posted 18 December 2012 - 04:42 PM

Using firebug, the upload file is being sent to http://localhost/~ro...admin/links/add if I hit this page before trying to upload everything goes fine, but after trying to upload the session is unset and the page redirects to login screen. In order to upload my user needs to be autenticated so after the login form I set a session and check it in upload controller.

Is it possible that the upload process is killing my session?? If so it's explained why I can't upload because http://localhost/~ro...admin/links/add redirects to login screen.

#5 RSPeres

RSPeres

    Member

  • Members
  • PipPip
  • 12 posts

Posted 18 December 2012 - 05:07 PM

maybe this??? [script_url] => http://localhost/~ro...rocery_crud.php this file don't exist! How did this path was created?


(
[script_url] => http://localhost/~ro...rocery_crud.php
[upload_dir] => assets/images/uploads/
[upload_url] => http://localhost/~ro...images/uploads/
[param_name] => sa146ba03
[max_file_size] => 104857600
[min_file_size] => 1
[accept_file_types] => /(\.|\/)(gif|jpeg|jpg|png|tiff|doc|docx|txt|odt|xls|xlsx|pdf|ppt|pptx|pps|ppsx|mp3|m4a|ogg|wav|mp4|m4v|mov|wmv|flv|avi|mpg|ogv|3gp|3g2)$/i
[max_number_of_files] =>
[discard_aborted_uploads] => 1
[orient_image] =>
[image_versions] => Array
(
)

)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users