-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attachment bodyURL returning file path with generic extension '.blob' #11
Comments
The blob store doesn't know anything about filenames, and it's possible for multiple attachments to result in the same blob on disk, as long as their contents are the same. So it doesn't make sense to put an extension on a blob -- if two attachments "foo.jpeg" and "foo.JPG" are saved, with the same contents, there'd be no way to decide which extension the blob's file should have. I'm surprised that AVPLayer depends on the filename extension; most media APIs don't, they just look at the start of the data to identify the format. Is there a different call you can use that lets you specify the media type? |
I looked at AVPlayer and related classes but didn't see any relevant API. I suggest just deleting the link as soon as your UI is done playing the movie. |
Attachment data is stored as a file with the extension .blob
Using attachment bodyURL the file path to attachment data is obtained.
I want to play a mov attachment in AVPlayer but it expects a file with a know extension, e.g. mov, m4v.
As a work around I do the following
Symbolic links do not work. I then need to tidy up these linked files at some point. I thought maybe when the app terminates but this isn't good if the app is long running and lots of attachments and created and deleted. Ideally attachment data would be stored in files using the original file extension if available when created. If implemented, is this a pull request you'd accept? Is it something that you are planning on doing? Or is it not needed?
If this isn't possible is there a callback, notification, or property I could observe to tell me the data is being updated/deleted and I should delete stale file links. Thanks for any help.
The text was updated successfully, but these errors were encountered: