locked
How to change File Sharing Name

    Question

  • I success to share a file and the file name is testing.pdf. But I want to share the file for name abc.pdf. How can I change it?Below is my code.

    DataRequest^ request = e->Request;
    request->Data->Properties->Title = "Testing";
    request->Data->Properties->Description = "Email With Attachment";
    
    DataRequestDeferral^ deferral = request->GetDeferral();
    create_task(Windows::ApplicationModel::Package::Current->InstalledLocation->GetFileAsync("testing.pdf")).then([this, request, deferral](task<StorageFile^> getFileTask)
    {
        try
        {
            auto pdfFile = getFileTask.get();
            auto storageItems = ref new Platform::Collections::Vector<IStorageItem^>();
            storageItems->Append(pdfFile);
            request->Data->SetStorageItems(storageItems);
            deferral->Complete();
        }
        catch (Exception^ ex)
        {
            // Calling FailWithDisplayText() also calls Complete on the deferral.
            request->FailWithDisplayText(ex->Message);
        }
    });

    Monday, February 16, 2015 11:12 AM

Answers

  • save it first as abc.pdf in your local storage and share that? you cant change the name wit hthe sharing api's

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, February 16, 2015 1:56 PM

All replies

  • save it first as abc.pdf in your local storage and share that? you cant change the name wit hthe sharing api's

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Monday, February 16, 2015 1:56 PM
  • Thanks for your answer. Based on the code at above, if I want to show company logo inside email content what should I do and can show me some example code?
    Tuesday, February 17, 2015 7:34 AM
  • Hi Tonberry89,

    You have another post for discussion how to show company logo with email content, let's continue that topic here.

    I will mark Dave's reply as answer since he exactly answer your current question.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, February 27, 2015 1:19 AM
    Moderator