File Upload Progress Bar Not showing

I have followed the documentation to add a progress bar to a file upload form but it is not showing. Not sure if it is a similar issue I had before with where the tutorials use an older expression builder.

I’ve tried to adjust the dynamic style attribute in code view as before but still no joy.

Here’s the code:

<div class="progress" dmx-show="form2.state.executing">
						<div class="progress-bar bg-success progress-bar-striped progress-bar-animated" role="progressbar" style="width: 0%;" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100" dmx-style:width="form2.uploadProgress.percent+'%'">
							Uploading ...</div>
					</div>

Thanks in advance!

Try something like this…

<!-- /.progress-bar -->
<div class="progress my-3" dmx-show="state.executing">
<div class="progress-bar progress-bar-animated progress-bar-striped bg-primary" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" dmx-style:width="uploadProgress.percent+'%'">
Uploading...
</div>
</div>
<!-- /.progress-bar -->

I had this working this morning using the code i posted above but I changed the aria-valuenow to 0. It showed a couple of times but very briefly as the file is uploading very quickly. But now it isn’t showing again. I’ve tried to upload larger images but there appears to be a limit to 10mb. Is there a way to increase this limit? I’m currently running a testing environment using MAMP Pro.

Thanks in advance!

You need to set the value of upload_max_filesize and post_max_size in your php.ini :

; Maximum allowed size for uploaded files.
upload_max_filesize = 40M

; Must be greater than or equal to upload_max_filesize
post_max_size = 40M

After modifying php.ini file(s), you need to restart your HTTP server to use new configuration.

If you can’t change your php.ini, you’re out of luck. You cannot change these values at run-time; uploads of file(s) larger than the value specified in php.ini will have failed by the time execution reaches your call to ini_set.

Thanks for this #revjrblack.

to help others I discovered you can adjust the php.ini in MAMP pro as follows:

File/Edit template/PHP/ [your version- i.e: 7.2.10 ]

I read that it is recommended to use a slightly higher value in the post_max_size

for example

; Maximum allowed size for uploaded files.
upload_max_filesize = 20M

; Must be greater than or equal to upload_max_filesize
post_max_size = 21M
1 Like