The right way to email a video
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
The right way to email a video
Hi,
which is the best way to send a video via email? I'm trying this but the video file is not attached to the composed email...
mobileComposeMail "My subject", , , , "My body", videoPath
which is the best way to send a video via email? I'm trying this but the video file is not attached to the composed email...
mobileComposeMail "My subject", , , , "My body", videoPath
Re: The right way to email a video
Hi,
There are (at least) two ways to send an attachment. The first is to attach the binary data directly.
The second way is to provide a file path.
In both cases, the attachment parameter needs to be an array.
The mobileComposeMail entry in the dictionary contains some very good examples and is worth reading.
Kind regards,
Mark
There are (at least) two ways to send an attachment. The first is to attach the binary data directly.
Code: Select all
put url ("binfile:" & myVideoPath) into myData["data"]
put "video/mp4" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData
Code: Select all
put myVideoPath into myData["file"]
put "video/mp4" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData
The mobileComposeMail entry in the dictionary contains some very good examples and is worth reading.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: The right way to email a video
Thank you so much Mark, this make all clear.
Re: The right way to email a video
Is the first way adapt also to send images? I mean, could I send an image without have a file?
Re: The right way to email a video
Hi,
Yes, that should work.
I don't know if this is relevant to you, but this won't work on Android due to a bug. It works on iOS only.
Kind regards,
Mark
Yes, that should work.
I don't know if this is relevant to you, but this won't work on Android due to a bug. It works on iOS only.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: The right way to email a video
Mark wrote:Hi,
Yes, that should work.
I don't know if this is relevant to you, but this won't work on Android due to a bug. It works on iOS only.
Kind regards,
Mark
Oh, yes, it's very relevant, it was just because I could not send attachments with Android I wanted to know this method. So now I know that there is no hope. Thanks for telling me.
PS
Just to understand, to send an image, what I should write instead of
put url ("BinFile:" & myVideoPath) into myData ["date"]?
Re: The right way to email a video
Hi,
If you want to send an image that is on the card, you can use
and if you want to send an image that is on disk, you can use a file path in the same way as with videos. Keep in mind that the mime type is different. For PNG files for example:
If you want to include an image from the stack rather than from a file and you don't know which format the image is in, you can export it first:
Kind regards,
Mark
If you want to send an image that is on the card, you can use
Code: Select all
put the text of img 1 into myData["data"]
Code: Select all
put url ("binfile:" & myPicturePath) into myData["data"]
put "image/png" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData
Code: Select all
export snapshot from img 1 to myPictureData as PNG
put myPictureData into myData["data"]
put empty into myPictureData
put "image/png" into myData["type"]
put "File Name" into myData["name"]
mobileComposeMail "My subject", , , , "My body", myData
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: The right way to email a video
Thank you so much Mark!