Forums

uplaod file and redirect - path of our defined upload folder is overwritten

lalako 26 May, 2020
Hello

We want to redirect after the file upload has been done, that works but the "path" is overwritten to the standard upload path. There is a problem when we add the submit element and then submit the file the "path" variable is somehow overwritten and instead of uploading the file inside our defined directory it uploads it into the standard {path:front}/uploads folder.

Are we doing the redirection correctly?

Please help!!

Thanks
Max_admin 27 May, 2020
which version ?

So without the redirect the upload path is used correctly ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lalako 27 May, 2020
Yes, upload works it also works when we add the submit element (see picture) but then it starts uploading it into the default directory and not into our defined o
ne



​.
That's because somehow the [path] variable is overwritten because somehow the submit element has also a var -> path which is equal to the standard upload folder
. By adding the "submit" element which contains the redirection, this "submit" component overwrites our defined path to the standard ..../uploads path.


Max_admin 27 May, 2020
where do you configure the upload path at the moment ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lalako 27 May, 2020
I configure it inside the upload directory path of the upload element, it works but when I add this "submit" element that contains the redirect, then it starts uploading to the default /uploads folder. In the debug message: it seems that there is a second path variable coming from "submit" which is then used as
uploadpath



[submit....] => Array { ... path = default path which is /....../uploads}
[upload3] => Array { ... path = here i see my correct path, that i have set}
Max_admin 30 May, 2020
Ok, I think this is because you use the "Upload files" setting in the form settings, which uploads to the default path, if you need a custom path then use the "Upload files" action under "Pages > Actions" and disable the one under the "Settings"

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lalako 31 May, 2020
"disable the one under the "Settings""-> When I do this then the file is not uploaded at all (see pictures)

Is there somewhere an example of how to simply do a redirect after the file is uploaded in our custom path?
Max_admin 01 Jun, 2020
Please disable the "Auto upload file fields" and the upload setting under the form settings, if you need a custom upload path in v6 then you should use the upload action and you are already doing that!

An alternative solution is to use v7 beta:
http://www.chronoengine.com/blog

The uploads will be enabled by default in the "Form behaviors", but you can add the "upload settings" behavior and that will let you change the uploads path!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
lalako 03 Jun, 2020
Unfortunately, it does not work. Do you know how we can overwrite this [submit_uplaod] -> [path] array value (see attachment)? [submit_uplaod] -> path is overwriting our defined path
Max_admin 21 Jun, 2020
Did you use an "Upload files" action and DISABLED the "upload" setting under the form Settings area ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
joachimliedtke 20 Nov, 2020
Same problem here and in the form settings area upload is disabled. And you get a warning:
Warning:  pathinfo() expects parameter 1 to be string, array given in /libraries/cegcore2/admin/extensions/chronofc/functions/upload/upload_output.php on line 12

Right now v7 is not a replacement for v6 since some functions seem to be missing like csv output. And I will patiently wait for an update.😉
Max_admin 21 Nov, 2020
what is the problem you have exactly ?

For that warning, what is your file field name ?

The CSV export is available in the data log, or you mean as an action ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
joachimliedtke 23 Nov, 2020
[blockquot[li]what is the problem you have exactly ?[/blockquote][/li]
  • Whatever I type into Upload directory path the upload path is the default one. I already switched off the uploads in settings as you advised.
  • For that warning, what is your file field name ?

  • Isn't this irrelevant for this warning? The field name is called file
  • The CSV export is available in the data log, or you mean as an action ?


    I mean as an action.
    Max_admin 23 Nov, 2020
    I have just tested this here, changed the upload path in the global form settings and it worked fine, make sure the path is correct!

    No warnings here, try to change the file name to "file_1", what happens ?

    The CSV action is coming in the next update!
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    joachimliedtke 23 Nov, 2020

    I have just tested this here, changed the upload path in the global form
    settings and it worked fine, make sure the path is correct!


    Sorry for being not precise enough here. My problems were referring to Chronoforms V6 and not V7. But thx for CSV action coming to V7 also. Any chance for an action writing a json file?🙂
    Max_admin 23 Nov, 2020
    for custom files you can use the PHP action to do that!
    Max, ChronoForms developer
    ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
    ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
    This topic is locked and no more replies can be posted.