Hi Vato!
I tested this quickly on my test site and if choose X-Accel-Redirect/X-Sendfile as the download method for files, the URL for the file in the media library is available if I use GET /wp-json/wp/v2/media/
, but I am unable to access that file when I try to visit the direct link due to a .htaccess
restriction
Could you double check which method you are using for file downloads?
Thread Starter
vato
(@vatanbytyqi)
Hi Etienne,
I checked my settings and the download method was set to “Force download”. I changed it as you suggested to X-Accel-Redirect, however the problem persists.
- /wp-content/uploads/woocommerce_uploads/.htaccess
deny from all
I shouldn’t be able to access according to access configuration?
I’m checking with my host provider for the configuration and will get back as soon as I have more information.
Thanks!
-
This reply was modified 4 years, 1 month ago by
vato.
Hi @vatanbytyqi
I checked my .htaccess
file and it also only has the deny from all
rule so it should work on your site as well.
Did you manage to find anything out from your host?
Thread Starter
vato
(@vatanbytyqi)
Problem solved. My files were cached somewhere and any .htaccess change didn’t affect until the cache was cleared.
Thank you for your help @etiennep