NO BUG: $form->get_uploaded_files() [URL] not working with custom directory

Hello everyone,
I am using a bricks custom php form which includes a file upload, therefore I need the URL of each uploaded file.

When selecting the custom file directory within the bricks upload files element, the file saves in a custom directory, but these URL changes are not applied to $form->get_uploaded_files()[0][URL].

Permalink of the uploaded image (my custom path: profileimg): https://interesting-greider.195-20-236-42.plesk.page/wp-content/uploads/profileimg/Screenshot_42.jpg

The output of $form->get_uploaded_files()[‘form-field-xxxxxx’][0][‘URL’]: https://interesting-greider.195-20-236-42.plesk.page/wp-content/uploads/2023/10/Screenshot_42.jpg (which simply does not exist)

This is a problem as these links are saved in custom post meta for displaying images.

Please correct me if I am wrong,
Best wishes
Tobi

Hi @tobi ,

Kindly refer to this. The [‘url’] is just a temp location and it will be moved to your custom directory.
Please access [‘file’] array key to get the physical uploaded location.

Regards,
Jenn