CMS Development

PNie
Member | Platinum Partner
Member | Platinum Partner

File Property really inconsistent.

SOLVE

So the file property has been going through changes, these changes have generally failed to consider existing usability of the file property which has resulted in numerous headaches for people already using the property how it was working before the changes....anyways there's now a public setting

PNie_0-1717645580050.png


Which is super, but it doesn't work really.

If a file is submitted from a form it'll be retrieved, yay

If a file is added via the hubspot admin (eg yellow highlight)

PNie_1-1717645725349.png


this simply returns an ID that isn't even accessible by the files api, just gives the 404 error unless the file exists in the filemanager (which it doesn't because that's not allowed via the new file property changes....) 

PNie_2-1717645969961.png

 

PNie_3-1717645991834.png

 



so public isn't public all the time...? Is this just bad implementation or no body testing....whats the point of public when it doesn't work consistently or admin users are prevented for fixing customers errors (which are so frequent....)

 

 

1 Accepted solution
PNie
Solution
Member | Platinum Partner
Member | Platinum Partner

File Property really inconsistent.

SOLVE

Yes and no.

Works for files attached via admin, fails for files attached via form.


If the file (with public set on the property) is attached via a form, it still gets flagged as private and gives a signed-url-redirect url which requires being logged into admin....because that's public right? The implementation is so botched and inflexible and untested by hubspot. 


so then you gotta do a string split to get the file id from the  signed-url-redirect, make the image public and then can call it....it's so stupid

View solution in original post

0 Upvotes
4 Replies 4
SteveHTM
Guide | Partner
Guide | Partner

File Property really inconsistent.

SOLVE

After wrestling with this and related issues for a while (no useful responses from support) I stumbled over these additional scope options that have been added to the private API setup. Perhaps a recent addition? Screen Shot 2024-07-09 at 4.31.27 PM.png

 

There was no error message that lead me here - just work on an unrelated task.

Anyhow, when I use theses added scopes I get past the the 404 errors from the file API for uploaded and attached file IDs. The IDs start functioning correctly in all cases that I have explored.

 

Hope this is helpful to the community.

 

Steve

Steve Christian

HTM Solutions

https://info.htmsolutions.biz/meetings/stevec2

mobilePhone
+1 6195183009
emailAddress
stevec@htmsolutions.biz
website
www.htmsolutions.biz
address
San Diego, CA
Create Your Own Free Signature
0 Upvotes
SProduction
Participant

File Property really inconsistent.

SOLVE

After digging out more I've found out that the issue seems relate to the application scope. I did not add the files.ui_hidden.read scope and I was receiving 404 errors. When adding this permission and reinstalling the app, I'm able to load the files uploaded in the properties without any issues. The API returning a 404 instead of a 403 was misleading but I think it might be your underlying issue as well.

0 Upvotes
PNie
Solution
Member | Platinum Partner
Member | Platinum Partner

File Property really inconsistent.

SOLVE

Yes and no.

Works for files attached via admin, fails for files attached via form.


If the file (with public set on the property) is attached via a form, it still gets flagged as private and gives a signed-url-redirect url which requires being logged into admin....because that's public right? The implementation is so botched and inflexible and untested by hubspot. 


so then you gotta do a string split to get the file id from the  signed-url-redirect, make the image public and then can call it....it's so stupid

0 Upvotes
SProduction
Participant

File Property really inconsistent.

SOLVE

I'm facing the same issue, I am trying to setup a bi-lateral synchronization between one system and HubSpot. When uploading a file in a property using HubSpot Admin interface, I'm listening to the property change using a webhook, but when I'm trying to load the file entity through the API it's returning a 404 Not Found. Even trying to get a signed URL seems to fail. I don't have any proper solution right now.

0 Upvotes