Search code examples
wordpressvideowoocommercemedia

Cannot access media files from woocommerce folder


I have developed a addon of woocommerce to upload video as a downloadable product and the customer is able to view that video in a popup rather downloading it from My Account > Downloads area.

I am facing issue that when i am trying to load video uploaded in /wp-content/uploads/woocommerce_uploads/my-video.mp4, it gives me error of 403 i.e I don't have access to the file of the folder.

When i compared the file and folder permissions with the default folders of wp then i find that the folders and files inside woocommerce_uploads have same permission.

I searched for the solution but didn't find anything yet.

Can anyone suggest me that how i can access this file so that it will load inside a popup.


Solution

  • woocommerce_uploads . folder will be containing an .htaccess file with deny from all inside it, please remove those texts to make those files publicly accessible.