Closed (works as designed)
Project:
Commerce File
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2014 at 11:48 UTC
Updated:
25 Apr 2014 at 21:47 UTC
Jump to comment: Most recent
Comments
Comment #1
bojanz commentedSee if this issue is the one that broke it: #2101017: Use of 'Content-Type: force-download' breaks downloading on Android
Try changing the headers that are outputted in commerce_file_download_page(), if force-download fixes it, then the issue above needs to be reopened.
Or clone commerce_file via git and revert this commit: http://drupalcode.org/project/commerce_file.git/commitdiff/ef65370
Comment #2
brodiebrodie commentedHello , thanks for that
I tried changing the headers by using ,
$headers = array(
'Content-Type' => 'force-download'
instead of
$headers = array(
'Content-Type' => mime_header_encode($file->filemime),
in file_entity.pages.inc
but this didn't seem to do the job, on iPad the file still streams .
Is that the sort of thing that you were suggesting?
Comment #3
bojanz commentedYes. I have no other ideas unfortunately. It's come combination of headers for sure.
Comment #4
brodiebrodie commentedThankyou,
I will keep looking, meanwhile I think we will just have to zip the files
Comment #5
torgospizzaThis is an iOS limitation: because mp4 format is associated with the browser, iOS plays the file in Safari even if you have set headers to force-download. (We sell media on our site as well, so we've had this question many times.) Essentially this is Apple's way of "sandboxing" apps with file types; they want you to create an app for your site and then associate files with that app, which would (in theory) trigger a download.
Your best option, IMO, is to host a streaming player for your mp4 files that iOS users can use to play back their content.
There are some other solutions discussed in this person's blog post, but I would use them at your own risk.
(This issue could probably be closed, because the issue lies with iOS, not Commerce File.)
Comment #6
brodiebrodie commentedThanks, I'll close it for the reasons in #5