APIs & Integrations

andrewv86
Participant | Platinum Partner
Participant | Platinum Partner

Uploading to the file manager using a custom module

SOLVE

I have a custom module which outputs an auto generated PDF, but I have no way to handle the file without using a storage solution like Amazon S3. Is there a way to have the file uploaded into the file manager within a custom module?

0 Upvotes
1 Accepted solution
TJoyce7
Solution
Participant | Diamond Partner
Participant | Diamond Partner

Uploading to the file manager using a custom module

SOLVE

@andrewv86 - gotcha, unfortunately to get them into the file manager, you will have to use a server. 

If the pdf's are linked to a contact, there's a possibility you could put a form with a file input into the page and then put the pdf into the form upload and send it as a contact property.

View solution in original post

6 Replies 6
dennisedson
HubSpot Product Team
HubSpot Product Team

Uploading to the file manager using a custom module

SOLVE

Looks like @tjoyce  has many face on the Community 😉

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Uploading to the file manager using a custom module

SOLVE

@dennisedson - Sadly, I have 7 HS logins and the new community doesn't remember your login, so if you forget to logout and login to the right one.... you get the idea... it's a real pain.

0 Upvotes
TJoyce7
Solution
Participant | Diamond Partner
Participant | Diamond Partner

Uploading to the file manager using a custom module

SOLVE

@andrewv86 - gotcha, unfortunately to get them into the file manager, you will have to use a server. 

If the pdf's are linked to a contact, there's a possibility you could put a form with a file input into the page and then put the pdf into the form upload and send it as a contact property.

andrewv86
Participant | Platinum Partner
Participant | Platinum Partner

Uploading to the file manager using a custom module

SOLVE

@dennisedson wrote:

@andrewv86 

A:  cool!

B:  I believe you would have to build your own app to process the file if you want it to go to HubSpot file manager using this api.

You will need to use an api key and you do not want that exposed. 

@tjoyce is a talented young man who might have some better ideas.  9 times out of 10, he does (and I relish that 1 time where mine is better)


@dennisedson I've been toying with the idea of using my own app to access those APIs, it would be nice to have a solution working solely in a custom module but that may be the closest solution.

 


@tjoyce wrote:

@andrewv86 - How are you auto generating a pdf if the end result of the generated pdf isn't stored on a server somewhere already?


@tjoyce Using a tool called jsPDF, you can autogenerate a pdf in JavaScript. From there it is treated as a blob file that is held in the browser, and then it can be downloaded or used any way you like


0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Uploading to the file manager using a custom module

SOLVE

@andrewv86 - How are you auto generating a pdf if the end result of the generated pdf isn't stored on a server somewhere already?

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Uploading to the file manager using a custom module

SOLVE

@andrewv86 

A:  cool!

B:  I believe you would have to build your own app to process the file if you want it to go to HubSpot file manager using this api.

You will need to use an api key and you do not want that exposed. 

@tjoyce is a talented young man who might have some better ideas.  9 times out of 10, he does (and I relish that 1 time where mine is better)