Keyword

How do you increase the attached file size

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago #128722 by Timothy Michel
How do you increase the attached file size was created by Timothy Michel
How do you increase the attached file size beyond 32M for videos for instance, like up to 300M.

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #128723 by Lefteris
Replied by Lefteris on topic Re: How do you increase the attached file size
Hi. This is something that can be changed on server configuration, not in K2. Ask your hosting provider for this. However don't expect to be able to upload a 300MB file using web. Most servers will return a request timeout.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago - 10 years 4 months ago #128724 by Timothy Michel
Replied by Timothy Michel on topic Re: How do you increase the attached file size
I can upload a 300M file via FTP without problem, I am just restricted to 32M for an attachment in the K2 article manager, which I assume is a limit placed by my hosting service which K2 reads from the .htaccess file. I can attach the file using "or select a file on the server" link which shows up as: "NatGeo_Richard_Gage_Interview.wmv " but when I view the page there is no attachment, which is to be expected because the file I selected on the server is larger than 32M. I just wanted to do this for testing purposes, I realize I will need a dedicated server to have files of this size available for download.

Just not sure how to make these remote files available as attachments in the K2 article manager.

I contacted GoDaddy, the host of this website, and they told me I have no file size limit except for the php file size limit which I set to the max of 128M, K2, however, shows that the file size limit is 50M instead of 128M. I just look at the Attachments Tab again and it does show 128M as the max upload size, but still the attachment isn't showing up in the article. Maybe I have to wait for caching hell to expire before I will see the attachment listed.

Again, I see no reason I shouldn't be able to provide any file size for download. As far as I know, the PHP file size limit is just an upload limit which shouldn't affect files I upload via FTP. Is there some work around for this?

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #128725 by Lefteris
Replied by Lefteris on topic Re: How do you increase the attached file size
So are you going to use FTP for that? Even if you do so, since K2 provides the download through a proxy php file , you need to also raise your server's memory limit. PHP will try to open and read the file. This means that if the file size is 300MB it will need 300MB of memory. Alternatively you can use extra fields instead of attachments and provide users the direct link to your files. In that case PHP is not involved at all.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago - 10 years 4 months ago #128726 by Timothy Michel
Replied by Timothy Michel on topic Re: How do you increase the attached file size
Yes I will use the Extra Fields as GoDaddy limits post_max_size = 128M, upload_max_filesize = 128M to these values. There are five (5) K2 php template files that I have to edit when I create custom Extra Fields, but I have done this successfully for adding sub_heading_1 and sub_heading_2 to items using if() statements within the for() loops, so I will do this for file downloads as well.

Thanks for the help again.

You are right, if I set the memory_limit, upload_max_filesize and post_max_size to 324M and I try to upload the the file through the interface, the server times out. If I upload the file via FTP and add the file as an attachment through " or select a file on the server" I am able to add it and a link title and link title attribute, and when I look at the page the attachment show up, but when I try to download the file I get the message "File not Found" for the hash name of the file because I didn't use the K2 interface to upload it so it doesn't exist. Guess I could manually add the file with the hash name to the directory, but this would be too much of a pain to do every time.

So I will create and Extra Field Group for this and provide for attachments 1 to 20 and then add an additional loop in category.php, category_item.php, item.php, latet.php, tag.php and generic.php to display only those attachments fields that have an entry, as well s provide the styles in k2.css.

Please Log in or Create an account to join the conversation.

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago #128727 by Timothy Michel
Replied by Timothy Michel on topic Re: How do you increase the attached file size
ExtraFields isn't a very secure way to make content available for download. Do you know of an extension available to allow for secure download of large files?

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #128728 by Lefteris
Replied by Lefteris on topic Re: How do you increase the attached file size
If you raise your memory limit, then you can upload the files using FTP. After that you can use the "Browse server" button to add the file you uploaded as an attachment. If you are getting a 404 error this means that either the item is unpublished or K2 cannot find the file ( permissions issue ? ) . There are several extensions out there for managing files and providing downloads. Go to Joomla! extensions directory and take a look. However note that for those extensions, you will still have to tweak your server.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago #128729 by Timothy Michel
Replied by Timothy Michel on topic Re: How do you increase the attached file size
File not found

Firefox can't find the file at www.jsandbox.org/evidence/videos/videos-opposing-ae911truth/download/188_d02c3707314ac414f5b48b64241415fb.html.

Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.]

The attachments function is obviously not being able to write to this directory. Even if I set permissions to 777 on this directory I still get the above error.

I believe my host, GoDaddy, arbitrarily limits the php memory to 128M as well as post_max_size, and
upload_max_filesize regardless of what I set it to in php.ini and the file size of the files I'm trying to make available for download are 220M or greater. This works fine using Extra Fields, but I can't use the attachments interface to accomplish this, I have to upload via FTP. So the attachments function still needs the memory limit to be set above 220M regardless of whether I upload via FTP or through the attachments interface, because it still attempts to re-write the file to the same directory where I uploaded the original using the random number generated file name hash. Then when I go to download, the attachments fetch function looks for that random number hash file name and it isn't there, so I get "File Not Found."

Please Log in or Create an account to join the conversation.

  • Timothy Michel
  • Timothy Michel's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 4 months ago #128730 by Timothy Michel
Replied by Timothy Michel on topic Re: How do you increase the attached file size
I talked to GoDaddy, I can't upload files greater than 128MB unless I lease a VPS. I will turn to video hosting that allows me to make the videos available for download with or without a trip to PayPal first.

There is a module called Dropfiles getk2.org/extend/extensions/1760-dropfiles that adds some nice styling and drag and drop features to the available downloads and they are hinting of having remote server file access in the next release.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum