APIs & Integrations

progr0
Member

Forms API file submitting by URL - incorrect determination of file name and extension

When I submitting a form with field of type file and passing url to the this file (uploading by link), HubSpot incorrectly determines the file name and extension. It tries to get filename from url, but do it incorrectly. Content-Disposition header, which contains a file name, is ignored too.

 

Example of my file URL:
https://mysite.com/assets/my-file-uuid-001/MyFileName.extension?access_token=somesequenceofcharacter...

URL also return Header Content-Disposition with file name.

HubSpot saves file with name assets-my-file-uuid-001-MyFileName.unknown

 

When I try to downloadthis file, it downloding the same as its viewing - with incorrect extension.

0 Upvotes
2 Replies 2
Jaycee_Lewis
Community Manager
Community Manager

Forms API file submitting by URL - incorrect determination of file name and extension

Hi, @progr0 👋 Thanks for reaching out! Did you get a solution for your issue here? 

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
progr0
Member

Forms API file submitting by URL - incorrect determination of file name and extension

No, unfortunately.

 

Now I doing another way:

  1. Uploading file to the File Manager.
  2. Use url of uploaded file as input to the form field.

But I don't think this is an acceptable solution to the problem. 

0 Upvotes