Method Community

 

How do I post a file using Classic view?

Last post 12-22-2021 10:48 AM by Method_Mamoon. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-13-2021 9:27 PM

    • Jamie
    • Not Ranked
    • Joined on 12-13-2021
    • Posts 2

    How do I post a file using Classic view?

    I have an API that creates an Activity Record and then needs to save a file as an attachment to that record. 

    I want to attach this file and be able to access it from a customer screen. 

    So far I have been able to POST the file and I can GET the file using the API. The question I have, is how do I access this file from a screen? 

    I know this is easier in the New version, but this client needs to continue using the Classic version. 

    Thank you in advance for any help. 

  • 12-21-2021 1:45 PM In reply to

    Re: How do I post a file using Classic view?

    Hi Jamie,

    Are you using the REST API or SOAP API? The REST API allows you to insert files to a record that can be accessed in the attachment widget which is only available in Method New. Alternatively, the SOAP API gives you the option to attach directly to the record through a file attachment field, which can then be added to the screen in classic. You can learn more about this here.

    We will eventually be retiring the SOAP API but will be giving our users plenty of advance notice before it happens. 

    Mamoon

    Mamoon Syed
    Product Manager
    Method Integration Inc.
  • 12-21-2021 8:05 PM In reply to

    • Jamie
    • Not Ranked
    • Joined on 12-13-2021
    • Posts 2

    Re: How do I post a file using Classic view?

    Hi Mamoon, thanks for your response. I have been using REST API, but also tried the SOAP API. I would like to try a workaround so I don't need to rebuild this when the SOAP API is retired. 

    I created a custom field on my Activity table called "InputAudioFile" which is a fileType field and I added this to my Classic Custom Activity Screen where I can add a file manually. 

    All I need is some way to add a file through an API so I can access it from a Classic screen. 

    Is there no way to update a fileType field through the REST API? 

    What would you suggest to accomplish what I'm trying to do. 

  • 12-22-2021 10:48 AM In reply to

    Re: How do I post a file using Classic view?

    Unfortunately, if you are using REST API there is no way to access the files you upload in classic. For classic, the only option would be to use the  SOAP API's MethodAPIInsertFile, page 22 of the documentation, operation and directly insert into a file attachment field.

    Mamoon Syed
    Product Manager
    Method Integration Inc.
Page 1 of 1 (4 items)