how do i upload 3gp files - 3gp

How do I upload 3gp files to my server and view it? I was told that I need a htaccess.

Apparently if you type :
AddType video/3gpp 3gp .3gp
inside of a .htaccess file it would help. According to Nokia's forums. Well this is if I understood correctly the question.

Related

IE and Edge are ignoring application/octet-stream MIME Type

Recently I've created a subdomain for downloads and I want the browser to download files instead of viewing it. For this I've added the following line into the .htaccess file:
AddType application/octet-stream .txt .png .jpg .jpeg .gif .exe .zip .rar .gz .sh .bat .doc .docx
On Firefox and Google Chrome it works but both Microsoft browser - Internet Explorer and Microsoft Edge are ignoring the MIME-Type and viewing them instead. How I also can force them to also download the files?
I can see that you had added all the file types in single line. So you can try to add them in separate line to check whether it solves your issue or not.
Based on my search, I find that IE can work with code below. So you can also make a test with it.
# Force PDF Download instead of display
<FilesMatch "\.pdf$">
ForceType applicaton/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
## End Force PDF Download instead of display
Reference:
Forcing a file to download in a browser via htaccess
If you are using PHP than you can try to refer approach below.
PHP allows you to change the HTTP headers of files that you’re writing, so that you can force a file to be downloaded that normally the browser would load in the same window. This is perfect for files like PDFs, document files, images, and video that you want your customers to download rather than read online. Using PHP you can take advantage of the PHP built-in readfile function:
$file_url = 'http://www.example.com/file.pdf';
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
readfile($file_url);
exit();
Reference:
(1) Force Files to Download and Not Open in Browser Using Apache or PHP
(2) Force save files all browsers - not open in browser window

Video cannot play in Ipad, but can play on desktop with using html5 video tag

I'm using the html5 video tag to display the video call from database, but the video cannot display properly on ipad, just can display on desktop. Is it the video I calling by file path from my file server cannot support by my ipad?
Because i have do one exaple just place a video in the same folder with my .aspx file which are use to call the video. It can be work.
Example call in same folder:
<video id="myvideo" src="a.mp4" controls="true" width="703" height="400" type="video/mp4"></video>
Example call from file server:
<video id="myvideo" src="\\10.200.1.90\tgm_navi_fs\eNotice\General Notice\Article\UploadedVideos\11_140327133434_Nanotips.mp4" controls="true" width="703" height="400" type="video/mp4"></video>
src="\10.200.1.90\tgm_navi_fs\eNotice\General Notice\Article\UploadedVideos\11_140327133434_Nanotips.mp4"
It looks like the problem is that the iPad thinks you're trying to access a local file, and iOS doesn't allow users direct access to the local file system. (You'll notice, iOS apps don't generally ask you to load or save work in a folder the same way desktop apps do.)
You probably need to set up a HTTP server (a.k.a. "web server", like Apache, etc.), either on the file server itself or on another machine that has access to the file server. Then you need to change the URL to use the http protocol.
So, for example, let's say you set up your web server on the file server machine and set the root to "\tgm_navi_fs\eNotice\General Notice\Article\". The video tag would then look like:
<video id="myvideo" src="http://10.200.1.90/UploadedVideos/11_140327133434_Nanotips.mp4" controls="true" width="703" height="400" type="video/mp4"></video>
There can be a lot of reasons why the video isn't playing.
You should always provide (a piece of) your code with your question so it's easier to see what is going on.
A few things that might help you:
The HTML5 video tag is not properly set up. Look at the code at Video for everybody!. There is also a lot more info on HTML5 video's in general.
The video doesn't have the right encoding for iOS (iPad). Try Miro Converter on you MP4 to convert it to an iOS compatible MP4.
The server is sending a wrong or no MiME type. Make sure you are sending the right MIME types by putting the following in your .htacces for example.
.htaccess video MIME Types:
AddType video/mp4 f4v f4p m4v mp4
AddType video/ogg ogv
AddType video/webm webm
AddType video/x-flv flv
The flv is usually used for a Flash fallback by plugins like MediaElementJS.

Firefox doesn't understand svg on remote server

I've got a curious problem where FireFox (and IE9, I think) can display a local html file which embeds an svg, but it can't display exactly the same file when it's on a remote server. Any ideas much appreciated.
The setup is that I have a test directory which contains index.html, an svg file, and a js file. When I point any browser at index.html it correctly displays the embedded svg. However, when when I upload this test directory to a remote server, then:
1 - Opera, Safari, and Chrome correctly display the svg
2 - FireFox complains that it needs a plugin for the svg
3 - IE9 displays nothing.
Something is different about the remote setup, but I have no idea what. My suspicion is that this is an interaction of some sort with Apache (when I view index.html locally I'm not using Apache, of course - the browser is directly viewing the file).
Any ideas? Thanks.
Make sure the remote server sends the appropriate MIME type "image/svg+xml".
I run to this issue aswell on my remote server.
Adding this to .htaccess file solved my problem.
AddType image/svg+xml svg
AddType image/svg+xml svgz
For more information see SVG MIME TYPE

#font-face fonts only work on their own domain

I am trying to create a type of font repository for use on my websites, so that I can call to any font in the repository in my css without any other set-up. To do this I created a subdomain on which I placed folders for each font in the repository that contained the various file types for each font. I also placed a css file called font-face.css on the root of the subdomain and filled it with #font-face declarations for each of the fonts, the fonts are linked with an absolute link so that they can be used from anywhere.
My issue is that it seems that I can only use the fonts on that subdomain where they are located, on my other sites the font does not show. Using firebug I determined that the font-face.css file was successfully being linked to and loaded. So why does the font not correctly load? Is there protection on the font files or something? I am using all fonts that I should be allowed to do this with, so I don't see why this is occurring. Maybe it is an apache issue, but I can download the font just fine when I link to it.
Oh, and just to clarify, I am not violating any copyrights by setting this up, all the fonts I am using are licensed to allow this sort of thing. I would however like to set up a way that only I can have access to this repository of fonts but that's another project.
This is because Firefox (from your mention of Firebug) thinks cross-domain, even subdomain, Web font embedding is a bad idea.
You can convince it to load fonts from your subdomain by adding this to the top-level .htaccess file of the subdomain where your fonts are being served (updated to adapt code from the same file in HTML5 Boilerplate):
<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
In response to this:
I would however like to set up a way that only I can have access to this repository of fonts but that's another project.
The W3C spec for Access-Control-Allow-Origin doesn't say anything more than either a wildcard "*" or a specific domain. So far, I've found this SO answer which suggests validating the Origin header, but I think that's a Firefox-only header. I'm not sure about other browsers (they don't even need the .htaccess trick above for cross-domain Web fonts to work).
Another way to fix this in Firefox is to embed the font directly into the css file using base64 encoding. Especially nifty if you don't have access to some of the configuration mentioned above.
You can generate the necessary code on fontsquirrel.com: in the font-face Kit Generator choose expert mode, scroll down and select Base64 Encode under CSS Options - the downloaded Font-Kit will be ready to plug and play.
This also has the fringe benefit of reducing page load time because it requires one less http request.
If you do not want to allow resources from all domains but only from sub domain of your site, you should do it like:
# Allow font, js and css to be loaded from subdomain
SetEnvIf Origin "http(s)?://(.+\.)?(example\.com)$" ORIGIN_DOMAIN=$0
<IfModule mod_headers.c>
<FilesMatch "\.(eot|font.css|otf|ttc|ttf|woff|js|png|jpg|jpeg|gif)$">
Header set Access-Control-Allow-Origin %{ORIGIN_DOMAIN}e env=ORIGIN_DOMAIN
</FilesMatch>
</IfModule>
Source: http://www.webspeaks.in/2015/01/wordpress-allow-cross-domain-resources.html
Using http://www.fontsquirrel.com/fontface/generator in "expert" mode and choosing base64 as an option returned a stylesheet.css with the necessary base64 encoded data to use in our stylesheet. Seems to work in all browsers we've tested except IE8.
We run into this issue most when applying themes to 3rd party tools like salsa petition where we're forced to host the font.
Thanks for all the help everyone!

Apache giving pages as downloads rather than displaying them

I just installed MediaWiki on a website and I am having some problems.
Whenever I go to "www.something.com/wikidir" the server gives me the PHP index file as an unnamed download instead of displaying it.
However, if I go to "www.something.com/wikidir/index.php" everything works as expected.
I'm not familiar with Apache and was wondering if someone could tell me how to fix this or point me in the right direction?
I'm using a LAMP stack and Mediawiki 1.7.1 (old I know).
In my .htacces file I have:
AddType application/x-httpd-php5 .php
Sounds like Apache (or PHP?) is serving the page as an application/octet-stream. You can check this by looking at the response headers on the non-index.php page. Firefox can do this using the Web Developer Toolbar > Information > View Response Headers. Look for "Content-Type"
Or, Does the non-index.php link work in IE? Does it go straight to download in Firefox (or another browser)? If the answer is yes, that's the problem.
How to fix it is more complex because there could be a bunch of different things that are causing this. My guess is that's it's an Apache config issue.
Edit
Check your .htaccess file. Make sure it's readable by Apache. I bet that's the issue.