Change upload path using RTMediaUploadFile.php


#1

I am trying to change the upload path of images, particularly rename the “user” folder that is automatically generated in the “rtmedia” directory. I came across this topic here and noticed the user mentioned the RTMediaUploadFile.php. I was able to locate this file on my server but I am not sure what the folder structure should be when I add this edited file to my child theme. I have tried quite a few combinations but to no avail. The only thing that actually worked was editing the core file in the plugin. I know this is not a good practice as plugins do update but can someone please point me in the right direction? Thank you in advance for any assistance.


#2

Hello @seanmac,

Yes, to rename /users/ folder in the upload directory structure, you can try the sample code mentioned in below document:

I hope it will help you.

Thank you.


#3

Yes! Thank you very much for your assistance and have a great day!


#4

Hmmm, for some strange reason this code is not working - at least not completely. I can indeed rename the “users” folder but no images are uploading in the folder created with the user’s id. The images don’t even show on the backend.


#5

Hello @seanmac,

We have updated the sample code in the document. Please once try placing the new code and let us know if you still face any issue.

Thank you.


#6

The updated code works perfectly! Thanks again for your help!


#7

Hello @seanmac,

We are glad to know that your issue has been solved.

I am closing this thread now.

Thank you, Pranali


#8