By breos on
Anyone can help here please?
I have this use of file_save_upload function:
$file=file_save_upload('fichero', $validators, $directorio);
Well, this line works ok with Chrome, but using it with firefox 3.6.6 or IE, it don't uploads the file :-/
I have put the next sentence at the start of the submit function:
print_r($_FILES);
On Chrome, this is the result:
Array ( [files] => Array ( [name] => Array ( [fichero] => Jellyfish.jpg ) [type] => Array ( [fichero] => image/jpeg ) [tmp_name] => Array ( [fichero] => C:\xampp\tmp\phpC1F9.tmp ) [error] => Array ( [fichero] => 0 ) [size] => Array ( [fichero] => 775702 ) ) )
On Firefox and IE, with the SAME code:
Array ( )
Why please?
Thanks
Comments
Same problem
Yeah, I`ve got same problem. My code is similiar I think so.
Your code works with Chrome
Your code works with Chrome Kuzmin?
It does not work in any
It does not work in any browser. It seems to me, that problem is in using CCK. My advanced_video_widget function describes an a CCK widget.
Everything works fine, using simple Form API function.
Try changing this line and
Try changing this line and tell us if it is working or not
--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com
No, it does not working. Also
No, it does not working. Also it seems to me, that it is a wrong way, because I got 2 CCK widgets, after changing code.
Excuse me, this code is looks
Excuse me, this code is looks working.
Screenshot#1 Create content page.
Screenshot#2 Success upload.
good to hear
good to hear that
this could be the difference but never know without further debugging :)
--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com
Thanks a lot for help! But
Thanks a lot for help! But what I should do with this problem? I mean that I got 2 CCK widgets (because function changes and return $form).
try changing $form to
try changing $form to $element, btw are you trying to build a custom cck element for uploading video? you do know that cck has video upload module that you can use right?
--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com
THANKS A LOT! I have found
THANKS A LOT! I have found the solution.
I just need to add $element['#tree'] = FALSE to my CCK widget.
Yeah, I know about it, but I want to implement some more functionality.
Thanks again!