I'm using Drupal and IMCE to upload files to a private file system. The problem is, I get an "Access forbidden" error whenever I try to access a file in it. And this is using user 1, administrator. Could anyone suggest how to properly set content access restrictions? I'm already using the "Content Access" module, but I guess I don't know how to use it properly. Thanks!
Try accessing it using the private/system url for the file instead of the direct sites/default/files/filename path
http://api.drupal.org/api/drupal/includes%21file.inc/function/file_create_url/6
Related
I am working for a client and cannot seem to find the solution to this issue. When changing the file path for the root directory of the WP File Manager we can "lockdown" and specify that we want the /home/site_name/files folder for the users to see when logged in. The default file path is /home/site_name/ and I can view the PDF's in the files folder by navigating and opening them up.
But once I specify that I want only the contents in the /home/site_name/file to be viewed I can no longer open the PDF's, it will give me a 404 this page cannot be found. If I take this URL and add in the /files/file_name then it loads... there is some disconnect between the link and the file path and I cannot figure it out.
Let me know if anyone has seen this before while using Wordpress File Manager!
Thanks!!
Update: After contacting the developers of the plugin there was a known issue with it, now with the new version the bug is fixed
I've created my bucket on Google Cloud with the appropriate site title, and installed Wordpress.
I then pointed Wordpress to my domain, but when I go to the domain I get the following error:
This XML file does not appear to have any style information associated
with it. The document tree is shown below.
<ListBucketResult xmlns="http://doc.s3.amazonaws.com/2006-03-01">
<Name>shop.site.com</Name>
<Prefix/>
<Marker/>
<IsTruncated>false</IsTruncated>
</ListBucketResult>
It was doing this before I installed Wordpress as well.
Some kind of security issue I think, but I've edited my bucket permissions and my default web page to be index.php but it's still showing this.
Any ideas?
I got the same error when hosting a new static website until if used the instructions here: https://cloud.google.com/storage/docs/gsutil/commands/web
That may or may not be the problem in this case, though.
You must use the gsutil command line to set the main_page_suffix.
gsutil web set -m index.html -e 404.html gs://example.com
I don't know why, but clicking an anchor link to a .themepack file in Edge causes Edge to change the file extension to ".htm" instead, but only on my site. The .themepack files available on the Microsoft gallery do not behave this way.
Given this, I'm sure it must be a server configuration, but I can't determine how to fix it. At first it was trying to display the .themepack (it's a cab format file) as if it was text, right in the browser. I added the html5 attribute "download" to my <a> tag and that prompted for download, but it still tries to name it as .htm.
Demo of issue:
https://soulcon.com/downloads contains a link to https://soulcon.com/img/SOULCON.themepack
This either tries to show as text, or if you use the page to click the link containing the "download" attribute, it downloads as a .htm file.
Links at https://support.microsoft.com/en-us/help/13768/windows-desktop-themes do not cause this.
Considering this site is on managed wordpress by GoDaddy, I don't have any true direct access to the server.
You need to associate the .themepack file extension with the application/octet-stream MIME type on the server. Ask a support person at your hosting provider how to do that. It may be doable with an .htaccess file.
Worked round the issue by zipping the file.
I have a form in ASP.Net MVC, which allows you to upload a file. The file is saved to a location on the server. For example, if the domain is www.test-domain.com, and the local path is c:\websites\test-domain.com\, the image is stored in /uploads/File/image.jpg.
When I try to access this url http://www.test-domain.com/uploads/File/image.jpg, I get redirected to the forms loginUrl="XXXX" path in web.config. To test, I removed the web.config entirely, and accessed the file. This time round, I get a 401 - Unauthorized: Access is denied due to invalid credentials.
I then uploaded another file via FTP this time, to http://www.test-domain.com/uploads/File/image2.jpg. This one can be accessed without any problem. I even tried download image.jpg as saved via Asp.Net, delete the file on server and re-upload the same exact file by FTP and it worked again!
It seems by FTP is working, while via Asp.Net somehow there are some access / authorisation requirement. I do have authentication set in Asp.Net, but I removed the entire web.config file, and I still got an error.
Any ideas?
I've found out why this was happening, though it is totally unrelated to what I thought it was in the beginning. I am uploading an image and resizing it. I've looked further in the code, and for some reason I was creating an image in the temporary windows folder, and then moving it to the actual location using File.Move.
It seems that the security permissions created are different, than if I had to create the file directly in the final folder. I've updated the code to create the image directly in the actual folder, and this is working fine.
Reference: http://blogs.msdn.com/b/oldnewthing/archive/2006/08/24/717181.aspx
I need to attach video files to nodes in Drupal 6, yet the AJAX uploader fails (the dreaded HTTP error 0), and anything I tried to debug it didn't help (may be moving to Drupal 7 will, but that's still going to be some time). Is it possible to somehow upload the file to the server via FTP, and then simply attach it to a node, so that it is linked in the same way that it would be linked after a regular file attachment?
This is not about CCK's FileField. This is about the "vanilla" node attachments. To do the same for FileField uploads I used FileField Sources module, and I'd like to find a similar solution for the node attachments.
your problem is in limit upload file size.
check it is in php.ini settings
do not forget that max package size limits upload size too
check drupal settings (drupal file system settings or filefield settings)
I believe I had something like this problem when I configured a site to run over SSL but not all the URLs in the system were being properly adjusted or redirected. I set the $base_url variable in settings.php to use https://www.example.com` and the error stopped.
In my case I believe it related to a Taxonomy tagging autocomplete callback, but all Ajax callbacks in the system can be sensitive on this point.
#646694 AJAX: Terrible reporting of status 0 response from AJAX request ("HTTP Error 0 has occurred")
Since I couldn't find a solution, I had to switch to using CCK FileField, and use FileField Sources module (http://drupal.org/project/filefield_sources) to upload files to the server and then attach them to the field.
Thanks for trying to help me, guys!