Media directory
-
Howdy,
the WP upload dir ist set to
define('UPLOADS', 'media');
After activation of your plugin, no media show up in the front end and the back end anymore.The page I need help with: [log in to see the link]
-
Hello,
Thanks for your message. VikBooking uses the WordPress upload directory to create a new folder and some default sub-directories for uploading files during pre-checkin or to perform other file upload related operations. Usually, the directory
/wp-content/uploads/vikbookingis created upon the installation of the plugin, as long as/wp-content/uploadsis your currently configured upload directory.The upload directory base path and base URL are read by our plugin by using the WordPress native function
wp_upload_dir(). There are no other hooks implemented to manipulate the upload directory settings, and so our plugin simply reads the WP upload dir in order to create the folder vikbooking inside it.Honestly, this simple procedure should not be affecting your media files, especially because our plugin only reads the upload directory without ever registering to any media related hooks. We suggest trying to restore the WordPress default settings, or to temporarily disable some other plugins that may be disturbing your media settings.
We hope this helps!
The VikWP TeamThank you so much for getting back to me.
I already added a snippet like
define( 'UPLOADS', 'media' );VikBooking added this directory /media/vikbooking
Under there are …admin …checkins …customerdocs and more.
The other Plugs does not affect the media apperence.
If I disable VikBooking, all is fine.
I really want to use ur software, it looks very promising.
Please, any other idea?Hi, thanks for pointing this out. VikBooking will verify the WordPress upload directory at every execution, and if its directory does not exist under the defined upload dir, then it will create its own sub-directories. As you’ve noticed, the directory
/media/vikbookingwas created with all the relevant sub-directories.However, VikBooking does not perform any other action with the WordPress upload directory. As we said, this is only read through the WordPress native function
wp_upload_dir()and so we do not understand how no media files show up after using this core function.Is there a particular reason why you would like to move the WordPress upload directory to a custom path? What happens if you do not overwrite it through the constant “UPLOADS”? In this case VikBooking should create its own directories onto
/wp-content/uploads/vikbooking, because/wp-content/uploadsis the WordPress default upload directory.If reading the upload directory through the WordPress core function breaks your media files, in the sense that they do not show up, then we can probably suggest using the default directory, without defining a custom path, just to see if anything changes.
We believe to have understood that by disabling the VikBooking plugin your media files show up again, but VikBooking does nothing more than reading what’s the default upload directory through the above mentioned core function. If that’s the case, then it probably means a custom upload directory will lead to such issues if
wp_upload_dir()is called by any WordPress plugin.Honestly, we’ve never heard of such issues with media files from any of our clients or VikBooking users, and since our plugin only uses WordPress core functions, we believe this is the expected behaviour when defining a custom upload directory and then requesting what value it is.
The topic ‘Media directory’ is closed to new replies.