⚠ In case you've missed it, we have migrated 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 is an archived forum. ⚠

  •     

profile picture

File upload error 404



RSPeres

RSPeres
  • profile picture
  • Member

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:

[color=#2C00C9][font=Monaco][size=2]
[color=#000000]$this->grocery_crud->add_fields([/color]'fk_curso_id'[color=#000000],[/color]'link_nome'[color=#000000],[/color]'link_url'[color=#000000],[/color]'link_image'[color=#000000],[/color]'link_cadastro'[color=#000000]);[/color][/size][/font][/color][color=#2C00C9][font=Monaco][size=2]
[color=#000000]$this->grocery_crud->edit_fields([/color]'fk_curso_id'[color=#000000],[/color]'link_nome'[color=#000000],[/color]'link_url'[color=#000000],[/color]'link_image'[color=#000000],[/color]'link_cadastro'[color=#000000]);[/color][/size][/font][/color][font=Monaco][size=2]
$this->grocery_crud->set_relation([color=#2c00c9]'fk_curso_id'[/color],[color=#2c00c9]'tbl_cursos'[/color],[color=#2c00c9]'curso_nome'[/color]);[/size][/font]
[font=Monaco][size=2]
$this->grocery_crud->set_field_upload([color=#2c00c9]'link_image'[/color],$this->config->item([color=#2c00c9]'diretorio_thumb_links'[/color]));[/size][/font]
[font=Monaco][size=2]
Thank's in advance[/size][/font]

victor

victor
  • profile picture
  • Member

Posted 18 December 2012 - 09:30 AM

Hi! show the url to function and base_url.

RSPeres

RSPeres
  • profile picture
  • Member

Posted 18 December 2012 - 14:59 PM

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

[color=#282828][font=helvetica, arial, sans-serif]base_url = [/font][/color]http://localhost/~rods/drc/

url to the function: http://localhost/~rods/drc/admin/links/index/upload_file/link_image

RSPeres

RSPeres
  • profile picture
  • Member

Posted 18 December 2012 - 16: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.

RSPeres

RSPeres
  • profile picture
  • Member

Posted 18 December 2012 - 17:07 PM

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


(
[script_url] => http://localhost/~rods/drc/Grocery_crud.php
[upload_dir] => assets/images/uploads/
[upload_url] => http://localhost/~rods/drc/assets/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
(
)

)