I have Audulus on my iPad, so I’ve looked at this a bit. Audulus files can be downloaded on an iPad by quick pressing the download link. This opens the file and displays it on the screen. The file can then be saved and opened in Audulus. The other thing that works is to long press the link and then select Open, or Open in New Tab, from the options menu. Doing this displays the file on the screen in the same way as when the link is quick pressed. It can then be saved and later opened in Audulus. I’m saving the files to Dropbox. When the file is saved, the .audulus file extension is preserved. I’ve tested this with links from here: https://forum.audulus.com/
I haven’t found any way to open a file directly in Audulus without first saving it.
So yeah we know there are workarounds, but they all require extra steps that you didn’t have to do on our old Vanilla forum.
On the old forum, you’d click on the file and it would either ask you where you wanted to open it (and Audulus would be an option) or it would just automatically open in it.
This really has to be how it works long term for us. The current solution isn’t workable. People should just be able to open the file after tapping on it, and not need a separate tutorial on how to open the files.
If we had known this was how Discourse works with our files, we would not have transitioned over to it fully until it was solved. That was my bad I guess - I figured it would just work just like everything else is working well.
I feel like the answer you’re giving me is you saying that you’re ready to stop working on this and that how it is right now is OK - I’m telling you though it’s not okay, and the solution you’re suggesting is something that people had already found as a workaround before you started working on this.
We have to make downloading our patches as fool-proof as possible. If it isn’t, we lose forum participation, and people might think “eh, is this patch worth the extra few steps I need to take to get it to work?”
No, I’m just telling you where it’s at now. I’d like to understand what conditions are required for iOS to give the option to open a file with a specific application and what it is that Discourse is doing to prevent that from happening.
I was looking at some test files today using macOS Firefox and what I see in the response header for .audulus files is text/html; charset=utf-8. I followed the same process for a zipped version and got application/zip. I believe that Discouse is setting the MIME type to text/html incorrectly rather than application/octet-stream or perhaps application/json (.audulus files are JSON files)
I rechecked by pasting a copy of the link into the address bar and is does look like it’s set to application/octet-stream. Earlier I was looking at the header returned from simply clicking on the file download link which was actually for the service worker. Sorry
One of the issues with the current process is that as far as I can tell, it is not possible to download and save a .audulus file without using either an external server like drop box or a third party app. If you short press the file and display the contents, it is possible to highlight the file contents and save them, but I could find no way to remove the .txt extension from within iOS. If I save the file to iCloud I can use myMac to remove the file extension, but that doesn’t seem to be an option with iOS. I don’t believe that Discourse is the root cause of the problem since it would appear that it is sending an appropriate MIME type, but until iOS 11 there was no user access to the iOS file system, so Safari was very restrictive regarding file downloads. I haven’t found any definitive info in the Apple developer docs, but I’ll keep looking
Thanks - just looking for a clarification though: does this mean you’re working on it and we can check back in about this in a few months, or you’re just stating it would take a few months to do this, but you’re not necessarily starting on it right now?
FYI application/force-download does not appear to be a registered MIME type per IANA: Media Types.
I was experimenting yesterday with possible work-arounds and discovered that if I used a file named test.audulus.zip that I would get the “open in Audulus 3” prompt. Of course the file wouldn’t actually open, but Safari apparently attempted to hand the file off based on the extension. It did result in registering Audulus as the application for opening ZIP files on my iPad, but that’s another issue. I’m guessing that the reason our old Forum is working is not because of the application/force-download MIME type specifically, since it seems very unlikely that Apple would have coded any specific support for an unregistered type, but rather that Safari didn’t recognize the MIME type and used the file extension instead. Perhaps the application/octet-stream gets some special handling in Safari for iOS. Apple’s documentation for Safari has not be updated in some time and makes no mention of file downloads outside the limited MIME types supported previously.