APIs & Integrations

vladbesson
Participant

How to upload file into filemanager into a specific folder?

I am using with form data in my post request:

let formData = {
  files: fs.createReadStream(__pathname),
  file_names: '',
  folder_ids: 'Folder name'
};

But file uploading in the root of Filemanager, instead of 'Folder name' folder

0 Upvotes
3 Replies 3
Willson
HubSpot Employee
HubSpot Employee

How to upload file into filemanager into a specific folder?

Hi @vladbesson 


Would you be able to clarify here what your endgoal is when you're attempting to upload this file into your File Manager? Are you working with a specific endpoint, if so, can you provide a link to the documentation you're referencing? 

 

To clarify, currently we offer 2 means of uploading files, these are the following:

  1. Upload a New File
  2. Upload a Replacement File

Are either of these endpoints being used in this process? 

 

Thanks

Product Manager @ HubSpot
0 Upvotes
vladbesson
Participant

How to upload file into filemanager into a specific folder?

I am using this part of API — Upload a New File
I have an existing folder in the File manager, and I want to upload a file into that specific folder. I know that I should use folder_ids parameter, but where I can find the id of my folder?  In file manager I see only name of folder

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

How to upload file into filemanager into a specific folder?

Hey, @vladbesson.

 

You can get the file IDs with this endpoint. There currently is no "Search for a folder by name" endpoint, however.

Isaac Takushi

Associate Certification Manager
0 Upvotes