I developed a web site using Drupal 6 and I need to allow users to upload and download large files (up to 200 MB). Can anyone tell me please how is this usually done? Because I don't know if this is best to do using HTTP, maybe there is other way.
The site is hosted in a dedicated web host and I don't have access to php.ini or other server configuration.
Which is the best way to do this?
Thank you.
FYI, the values are: upload_max_filesize and post_max_size
To start with, you need to find out what PHP's upload_max_filesize and post_max_size are. Have a look at the output of php_info() to find current settings. If they are > 200MB, you're OK to use HTTP already using any Drupal module that deals with file uploads.
If either setting is smaller, you can try to alter them at runtime with ini_set(), .htaccess, or a couple of other methods as per here but this may or may not work, depending on your host.
Related
I use NGINX for serving of static files which (it offloads the backend which serves only "dynamic" requests). But now I need to upload files to server. Is it possible to use NGINX for uploading too? Also it will be good if there is a way to set permissions of uploading files... How to use NGINX for uploading? Which protocol? Module? Some example configuration?
I found only WebDAV but its module looks outdated, also I never used WebDAV before so I am not sure how good is it (I mean performance). What is a typical solution? Do I need to write something, some plugin/module?
There is no built-in module to do the job. There is a third-party upload module.
I'm having a problem on a site that I manage where users can't upload files because the file attachments section doesn't show any inputs:
The exact same code on our dev environment works as expected, with pretty much the same database:
I suspect that the problem has to do with file permissions or upload size restrictions, but I'm not sure.
Drupal documentation on this, and forums, are pretty sparse. Any ideas?
Edit: I'm seeing this error message in the status report. Maybe it's related?
Check your configuration (file_uploads = On must be set to "On")
PHP configuration:
For file uploads to work, PHP must be configured properly. The following PHP configuration variables may need to be set or configured, in your PHP php.ini file, .htaccess file, or settings.php files.
file_uploads = On must be set to "On"
upload_max_filesize = 24M can't be larger than post_max_size
max_input_time = 300 small values may cause timeouts for large file uploads
memory_limit = 64M small values may cause out of memory errors for large file
uploads
max_execution_time = 180 small values may cause timeouts for large file uploads
post_max_size = 24M limits the size of input submitted to the website (including
attached files)
In back-end go to Configuration -> Media -> File system and just hit "Save configuration" button without changing anything. If there is a problem with some path (not writable) it's field will get red outline.
Thanks for all the help everyone. The answer to this problem was much simpler than I had expected--we just had to clear the Drupal cache. It was complicated by the fact that we didn't have full control over the production server, but once we cleared the cache from the browser everything was working again. Hope that helps anyone who runs into a similar situation.
Clearing the cache should be one of the first steps for addressing Drupal issues it seems! Should have thought of it earlier.
When I try to upload a 200KB file, for example, I get an error message saying the file is bigger than 8MB. When I try to upload a 10KB image, the upload process complets successfully.
I am using Drupal 7, SQLite as database engine, and the upload limit in php.ini is 8MB; the server is hosted on hordeeasy.com.
Can someone give me an advice?
This maybe a problem with your webserver/hosting.
File uploads are limited in two ways when using drupal with apache:
Php/apache enforced limit
Drupal enforced software limit
If you can get to your php.ini, check these settings are correct:
post_max_size = 20M
upload_max_file = 20M
I have a web project and I saved my images in Physical folders in hdd Like d:\SecretImages\Imagename. But I can't open the files when I have to?
I thought if it can saves for examle d:\SecretImages\Temp.jpg, I can open when I have to but, I can't.
Help me please, thanks
You cannot use file paths to show your images. The browser doesn't know where to find the images and the server wouldn't serve them up anyway due to security concerns.
You could/should use an HttpHandler to show the images.
I answered a similar question here on SO how to do this.
its becus when iis get file, it get as ASP.NET user not local system user. just go to the folder and add IIS_IURS group to permission list. or just set folder accessible by everyone.
this type of problem mostly not occur when local debugging. but will happen in production or network storage.
Try this article
http://www.aspsnippets.com/Articles/Display-Images-in-GridView-Control-using-the-path-stored-in-SQL-Server-database.aspx
I have a problem when trying to manually upload a new plugin in wordpress.
Uploading media is working perfectly, and also automatically install plugins work as it should, but manually uploading plugins generate an error message:
The uploaded file could not be moved to C:\inetpub\wwwroot\Wordpress/wp-content/uploads/2010/11.
I have checked permissions on wp-content and uploads and it is set to Everyone. I do not think there is anything wrong with permissions since I can upload images, and I see them inside my uploads folder.
I think there might be a problem with the slashes beeing incorrect, does anyone else have this problem?
I'm using IIS7, Windows Server 2008 and Wordpress 3.0.1. Everything is installed with Microsoft Web Platform Installer.
I know this is way late in answering, but I hope someone may find it useful.
This is most likely a problem with the settings involving the temporary upload location.
Here is what I did to solve a similar problem:
Ensure that you are editing the correct initialization file. Putting:
in a test.php file and executing it from your web browser will get you the setting.
Look for the setting for "Loaded Configuration File"
In that configuration file search for (or add if missing) the following setting:
upload_tmp_dir = "c:\inetpub\temp\uploads"
Ensure that c:\inetpub\temp\uploads exists and is writeable by everyone. You can tighten this up with specifying the IUSR account if you wish.
Recycle/Restart the IIS worker process. Your choice here as there are a number of ways to accomplish this.
I found a good bit of this info by referring to c:\tmp\php_errors.txt. The fastcgi.logging should be enabled by default on windows installations.
Just wanna add a solution to the good Harold's answer for PHP.
Despite changing the setting "upload_tmp_dir", I was still getting the same error message The uploaded file could not be moved to C:\inetpub\wwwroot\Wordpress/wp-content/uploads.
So i have changed also the setting "upload_max_filesize"
upload_max_filesize=16M
(16M or greater depending on the wordpress's themes size file)
Hope it helps someone who was stuck like me.
With Filezilla
directory uploads>2010>11 to set permision 777