file_attach_files function from file_api.php not working?

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
econsor_ag
Posts: 31
Joined: 18 Jun 2019, 08:35

file_attach_files function from file_api.php not working?

Post by econsor_ag »

I recently updated my mantis version and I noticed that my custom bugnote fileupload page is not working.
Looking into this I found that the file_process_posted_files_for_bug function was removed and replaced with file_attach_files function.
I edited the script with the new function and when I submitted my form it worked without error but when I looked into the bugnote page there was only a note without the file uploaded. Just to test it I inserted the deprecated function into file_api.php and it worked.

My question is, am I missing something when I use file_attach_files function? Does somebody have an idea why it would not upload the file?
cas
Posts: 1614
Joined: 11 Mar 2006, 16:08
Contact:

Re: file_attach_files function from file_api.php not working?

Post by cas »

I suggest you raise a ticket in the bugtracker.
For now, I suggest to add the deprecated function in cusom_functions_inc.php ( if it does not exist, create it). It is not a good idea to change the core file_api.php
econsor_ag
Posts: 31
Joined: 18 Jun 2019, 08:35

Re: file_attach_files function from file_api.php not working?

Post by econsor_ag »

Hello cas,

I added the deprecated function to the site with the upload form I haven't changed the core file_api.php .
Are you sure that I should raise a ticket in the bugtracker?
cas
Posts: 1614
Joined: 11 Mar 2006, 16:08
Contact:

Re: file_attach_files function from file_api.php not working?

Post by cas »

You can do some further investigation, possibly new function requires specific parameters. I really do not know. In case you cannot find the issue, raisinga ticket is the best option.
econsor_ag
Posts: 31
Joined: 18 Jun 2019, 08:35

Re: file_attach_files function from file_api.php not working?

Post by econsor_ag »

Thank you I will raise a ticket.
Post Reply