Can we compact model files for RedirectDownload()?
#1

Hello!
I would like to know if it is possible to compress (zip or similar) the files on the host to use in RedirectDownload ().
Thank you!
Reply
#2

Quote:

- Adds support for URL redirection for model/texture downloads, which means you can host downloads on a web server instead of sending them through the SA-MP server. Client URL downloading is done via libcurl version 7.57.0 compiled with support for http, https, and zlib (gzip).

For example on apache2 webserver you can enable/install mod_deflate to get the files compressed automatically before they are downloaded
Reply
#3

Thank you!
Reply
#4

Sorry, but on my host I have no option to make certain files be compressed before download.
Can you explain how to do?

EDIT: I found a tutorial on internet. Thank you!
Reply
#5

Quote:
Originally Posted by JR_Junior
View Post
Sorry, but on my host I have no option to make certain files be compressed before download.
Can you explain how to do?
Add this to the mod_deflate config:

Code:
AddOutputFilter DEFLATE dff txd
That way .dff and .txd files will get compressed upon download.
Reply
#6

I have a doubt. In case when redirecting the download, should I use http or https (or another protocol)?
Reply
#7

Does SA-MP use http 1.1 or 1.0?

I'd like to know for nginx gzip compression settings as I'm not an apache user.

Reply
#8

Quote:
Originally Posted by Locky_
View Post
I have a doubt. In case when redirecting the download, should I use http or https (or another protocol)?
If you can use https, use that one, since https is faster then http (1.x, not sure with 2.0, but most servers still use 1.x).

https://www.httpvshttps.com/
Reply
#9

Quote:
Originally Posted by Zhao
View Post
Add this to the mod_deflate config:

Code:
AddOutputFilter DEFLATE dff txd
That way .dff and .txd files will get compressed upon download.
Quote:
Originally Posted by dugi
View Post
It's all in the RC thread, you can use both.
I'm not having success activating my compression on my Apache server. Can this value be set by .htaccess?
Reply
#10

First result should answer your question: http://lmgtfy.com/?q=mod_deflate+htaccess
Reply
#11

I'm using the optmization option in cpanel and is working fine with all files. Thanks!
Reply
#12

Quote:
Originally Posted by Zhao
View Post
Add this to the mod_deflate config:

Code:
AddOutputFilter DEFLATE dff txd
That way .dff and .txd files will get compressed upon download.
It is taking the same time to download the files. Is this code not working or am I doing it wrong?
PHP Code:
<IfModule mod_deflate.c>
    
AddOutputFilter DEFLATE dff txd
    SetOutputFilter DEFLATE
    
<IfModule mod_setenvif.c>
        
# Netscape 4.x has some problems...
        
BrowserMatch ^Mozilla/4 gzip-only-text/html
        
# Netscape 4.06-4.08 have some more problems
        
BrowserMatch ^Mozilla/4\.0[678no-gzip
        
# MSIE masquerades as Netscape, but it is fine
        # BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        # NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
        # the above regex won't work. You can use the following
        # workaround to get the desired effect:
        
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
        
# Don't compress images
        
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
    
</IfModule>
    <
IfModule mod_headers.c>
        
# Make sure proxies don't deliver the wrong content
        
Header append Vary User-Agent env=!dont-vary
    
</IfModule>
</
IfModule
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)