Questions tagged [attachment]

Any additional content added to a digital object, such as an email attachment.

Many languages provide facilities for sending email or transmitting other data (e.g. SOAP) but may not always provide a clear interface for attaching documents or other arbitrary binary data to the message or object.

This tag is for all questions relating to adding attachments to transmitted data or providing an interface for doing so.

2942 questions
15
votes
2 answers

Intent filter to download attachment from gmail apps on Android

I have android application with intent filter (ACTION_VIEW) to open file and import it into my application. I wish to download file attachment from gmail app into my application. Some of file type (i.e. jpg, png, txt) are saved correctly, but some…
oceanpriest
  • 153
  • 1
  • 5
15
votes
4 answers

Extending ActiveStorage::Attachment - Adding custom fields

I want to extend the class ActiveStorage::Attachment and add an enum attribute for visibility of attachments. My initial approach was to create a new file attachment.rb in the \app\models directory as follows. class ActiveStorage::Attachment <…
Patrick Frey
  • 775
  • 1
  • 8
  • 18
15
votes
1 answer

FFMPEG attach file as metadata

I have a set of images which I want to convert to a video using ffmpeg. The following command works perfectly fine: ffmpeg -y -i frames/%06d.png -c:v huffyuv -pix_fmt rgb24 testout.mkv I have some meta data in a binary file which I want to attach…
ahmadh
  • 1,582
  • 2
  • 18
  • 28
14
votes
1 answer

How to attach a PDF using barryvdh/laravel-dompdf into an email in Laravel

I know this question has been asked before but I apparently need my hand held. I'm trying to attach the pdf to an email and send it off. I've done it outside of Laravel with PHPMailer, but now I'm trying to it the Laravel way and cant get it to…
mcornille
  • 343
  • 2
  • 4
  • 17
14
votes
7 answers

How to attach a file to an email with PowerShell

I have written a PowerShell script that will create an email, however I can't seem to attach a file. The file does exist and PowerShell can open it, Could anyone tell me what I'm doing wrong? $ol = New-Object -comObject Outlook.Application $message…
TheLukeMcCarthy
  • 2,253
  • 2
  • 25
  • 34
14
votes
3 answers

Send email with attachment in Ruby

I need to send an email with an attachment via Ruby. Been searching around but haven't found any simple script example to do this. Closest I've found is ActionMailer but that seems to require a bunch of other scripts to to run. (NOTE: I am not using…
Haroon
  • 615
  • 2
  • 7
  • 12
14
votes
6 answers

SharePoint 2010 - Client Object Model - Add attachment to ListItem

I have a SharePoint List to which I'm adding new ListItems using the Client Object Model. Adding ListItems is not a problem and works great. Now I want to add attachments. I'm using the SaveBinaryDirect in the following…
Thorben
  • 143
  • 1
  • 1
  • 6
14
votes
10 answers

How to attach two or multiple files and send mail in PHP

The code below sends only one attachment, but I need to attach and send two file(one rar file and pdf) $email_to = "$email"; // The email you are sending to (example) $email_from = "online@example.co.in"; // The email you are sending from…
user3309116
  • 209
  • 2
  • 3
  • 7
14
votes
5 answers

How can a Delphi Program send an Email with Attachments via the DEFAULT E-mail Client?

Within my program, I am composing an email to send using the default e-mail client software installed on a user's machine. I have composed the mailto address, the subject, the multilined body, and I have several attachments to be included. I almost…
lkessler
  • 19,819
  • 36
  • 132
  • 203
13
votes
2 answers

HTML Code Link within an Email to an Email Attachment

Wondering if this is possible. Suppose an email is written in HTML for email clients to render. And an anchor tag exists in the HTML code that is going to be parsed by the email client. One can reference resources (images, files, etc..) externally…
Steve Nguyen
  • 5,854
  • 5
  • 21
  • 39
13
votes
2 answers

php: download variable content as file

Is the subject possible? I have a script executing. At one point I have a large piece of text in a variable. Could I make it available as a downloadable file without actually writing variable content to disk?
facha
  • 11,862
  • 14
  • 59
  • 82
13
votes
2 answers

Attach File Through mailto URI

Is it possible to attach a file using "mailto:" redirect in javascript? Something like this: document.location = "mailto:"+recipient+"?subject="+subject+"&body="+msg+"?attach="+"file1.zip";
Kiran
  • 8,034
  • 36
  • 110
  • 176
13
votes
3 answers

Ruby on Rails PaperClip Gem validate_attachement error

I have googled/stack overflowed for hours and not found a solution to this problem. I'm wondering if my installation of PaperClip was somehow unsuccessful. I'm trying to validate an image attachment in my models folder: validates :image, presence:…
dtothefp
  • 1,364
  • 1
  • 16
  • 22
13
votes
4 answers

Get the Gmail attachment filename without downloading it

I'm trying to get all the messages from a Gmail account that may contain some large attachments (about 30MB). I just need the names, not the whole files. I found a piece of code to get a message and the attachment's name, but it downloads the file…
mopsiok
  • 575
  • 1
  • 10
  • 19
13
votes
3 answers

How do I write a restful web service that accepts a binary file (pdf)

I'm trying to write a restful web service in java that will take a few string params and a binary file (pdf) param. I understand how to do the strings but I'm getting hung up on the binary file. Any ideas / examples? Here's what I have so…
Preston
  • 3,273
  • 4
  • 26
  • 35