Buy Now
Sign in

File Field Problem?

Fredolino , August 31 2019, 13:55
Fredolino 533
August 31 2019, 13:55 #389058
Hi,
if I upload an image with the file field, then the image name is stored in the database but the file is not loaded on the server as it automatically works with the CF action.
"Upload to server" is activated.
What do I have to do in CC6?
F.
healyhatman 8
August 31 2019, 14:33 #389059
Untick upload to server and use the action instead
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 533
August 31 2019, 15:04 #389060
this, not works:
File Field
Tab general:
Name: fotoupload
Name: Fund[photo]
ID: fotoupload
Tab events:
no empty
Function
{fn:upload56}
under Functions
upload file-Function
name: upload56
F.
healyhatman 8
August 31 2019, 21:30 #389062
What does the debug say
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 533
September 01 2019, 09:59 #389065
I still do not understand how it works with the function "Upload files" and the "File field".
If I do not have the function in the form, only in the Events tab, then nothing will be displayed in the debugger.
If I have the form:
<td> <strong> Upload a photo: </ strong> <br />
{fn: upload_foto} {view: fotoupload} </ td>
then the debugger shows me:
Array
(
&nbsp;&nbsp;&nbsp; [path] => /.../components/com_chronoconnectivity6/chronoconnectivity/uploads/
&nbsp;&nbsp;&nbsp; [var] =>
)
But here the file is not uploaded.
Fredolino 533
September 01 2019, 10:08 #389066
ok, with file config say the debugger:
[pre][photo] => Array
(
[extensions] => Array
(
[0] => jpg
[1] => jpeg
)

[info] => File is not present.
)

[var] => Array
(
)

)
[/pre]
healyhatman 8
September 01 2019, 13:56 #389067
So the file upload function UPLOADS the file that the user has sent. So it goes in the submit event.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 533
September 01 2019, 14:15 #389068
I must have also in CC6 a Event "submit" under the tab Events?
healyhatman 8
September 01 2019, 14:26 #389070
Of course. Doesn't need to be called that but yes. You submit the form to the event, which is where the file is actually uploaded.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 533
September 01 2019, 14:30 #389071
ok,
[div]but, the form (with file field) is in the Event:
save_new_beob
and in this i have the function:
{fn:upload_foto}
[/div]
Fredolino 533
September 01 2019, 14:33 #389072
also the form: beob_new_form
with the file field
have&nbsp; the submit event: save_new_beob
healyhatman 8
September 01 2019, 14:37 #389073
If I put a save data action and a text field in the SAME event, it won't work because the text field hasn't been filled in yet. Same 5hing as with the file field. You can't put the file upload action the the same event as the file upload field, because you haven't selected the file yet.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 533
September 01 2019, 14:46 #389074
also so not work in CC6?
healyhatman 8
September 01 2019, 14:54 #389075
put the file upload function in the event that that form submits to
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
Fredolino 533
September 01 2019, 14:59 #389076
yes, i have...under the Event: save_new_beob
{fn:upload_foto} <- save not data of server
{fn:save_beob_new}&nbsp; <- save dataname in database (its work correct)
and the form (name: beob_new_form) with files field have a submit event: save_new_beob
Fredolino 533
September 01 2019, 20:23 #389078
 Answer
:-)
Problem solved.
actived upload to Server in file field and the function in Events.