When I'm sending mail form in my app I can attach some files. But in the email it looks like aeb6fe78271a1f2f51c7b84981b9e8df.png How can I show link to file?
if the file is hosted in the web. then checked it out the file link inside the email, maybe the generated file url is a relative path which did not contain the host information.
another solution maybe attach the file as an attachment inside the send email.
Related
How can we send attachment along with an ics file that are created from MVC application.
We are creating the meeting invitations with data fetched from application in ics format and then downloading for the user to click on it and open in outlook.So can we add an attachment also along with the ics file so that users wen open in outlook will see the attachment along with other details.
Please somebody help.
As per https://www.rfc-editor.org/rfc/rfc5545#section-3.8.1.1 or https://icalendar.org/iCalendar-RFC-5545/3-8-1-1-attachment.html, one can ATTACH by referring to the URL of the attachment.
An example given is:
ATTACH;FMTTYPE=application/postscript:ftp://example.com/pub/
reports/r-960812.ps
Other examples elsewhere in the spec are:
ATTACH:http://example.com/public/quarterly-report.doc
or
"The following example specifies an "ATTACH" property with inline
binary encoded content information:
ATTACH;FMTTYPE=text/plain;ENCODING=BASE64;VALUE=BINARY:VGhlIH
F1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4
"
or
ATTACH;FMTTYPE=application/msword:ftp://example.com/pub/docs/
agenda.doc
Im trying to extract all of my sms content and email content from a mautic install and put it into another install. What is the file path where these are stored?
As suggested, the data will be stored in your database, and any files uploaded will be in the file system (most likely in /media/images if you didn't modify the location).
I can easily create a URL File through the O365 OneDrive web UI. Right click > New > Link. Enter the URL and save. The new item appears in the UI and when clicked, it will take you directly to the new URL, let's say it's www.google.com.
I'm attempting to duplicate this with the Graph API.
GET /me/drive/items/{folderId}/children
with:
{ name:'www.google.com.url',
file:{}
}
It creates what appears to be a link in the OneDrive UI but when clicked, it will not take you to the URL, it attempts to download a file. I've tried creating it with and without the .url suffix. The API looks pretty limited and there aren't many options to pass. I've also tried the beta API, same issue.
Links are actually a file with a special syntax similar to an INI file. From the sample you included here, it looks like you're creating an empty (0 byte) file named "www.google.com.url". Since the empty file doesn't match the format expected for a .URL file, OneDrive doesn't know what to do with it and just downloads the file.
To create a link programmatically, you would need to make a request like this:
PUT https://graph.microsoft.com/v1.0/me/drive/root/children/ShortcutToBing.url/content
Content-Type: text/plain
[InternetShortcut]
URL=https://www.bing.com
This will create a file named ShortcutToBing.url, and fill the contents of the file with the text below the request, which is the contents of a .URL file, pointing to www.bing.com.
In my application i have a file upload option. The uploaded files used to saved in DriveHQ ftp server. After uploading i want to send a mail to the admin with the uploaded file as attachment.
I tried as follows
uri = URI::FTP.build(['username:password', 'ftp.drivehq.com', nil,"\\My Documents\\#{17}\\Fitness.txt", 'i'])
And in the mailer:
attachments['image'] = {mime_type: 'text/plain',content: File.read(uri)}
But its not working. it was returning error as
bad component(expected relative path component): \My Documents\17\Fitness.txt;type=i
I guess you're using the API in a wrong way.
You need to download the file, and yes you do it by creating an URI to the FTP server, but then you need to download the file to a temporary directory.
After that, in your mailer you read that file.
Remember since File is a subclass of IO and it does not have the read method, when you invoke File.read, you are actually calling IO.read.
I am starting up with rails and was going thru the sharebox-tutorial.
Now is it possible with paperclip to first preview the uploaded files and then choose the download link, rather than the file directly being downloaded when link is clicked, as in the tutorial and elsewhere in the internet.
Also, what will be the method to generate a share link unique to every friend email.
While researching, i also found out that files should be uploaded in some other folder but public.
how is it different from storing the files in public folder with the url hashed. the hash url is still accessible when user is logged out.
UPDATE
the preview i am referring to should be after uploading.