APIs & Integrations

BikramSahu
Member

Files uploaded via API does not open

I could upload files successfully using the POST/files/v3/files/import-from-url/asyncAPI. However, the files uploaded are unusable as they don't open when downloaded. PFA the attached screenshots. All such uploaded files occupy a space of 73 KB. 

BikramSahu_0-1670495927160.png

Any idea, what is wrong here? Below is the request body.

URL: https://api.hubapi.com/files/v3/files/import-from-url/async

Body: 

{
  "access""PUBLIC_INDEXABLE",
  "name""Adiyogi-small.jpg",
  "url""https://drive.google.com/file/d/10ZElQAnaLg306gn5ZWlb5wvOlD90AeU_/view?usp=sharing",
  "folderId""94455205974",
  "duplicateValidationStrategy""NONE",
  "duplicateValidationScope""ENTIRE_PORTAL",
  "overwrite"true
}

BikramSahu_1-1670496095482.png

 

0 Upvotes
3 Replies 3
BikramSahu
Member

Files uploaded via API does not open

Hi Jaycee, thanks for your reply. I retested the scenario and the issue still persists. Yes, the files are hosted in a publicly shared folder with edit access. You can use the same shared link for reproducing at your end. Your input on this is appreciated.

Regards, Bikram.

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Files uploaded via API does not open

Thanks, @BikramSahu 👋 I'll set up a test using your link.

 

One clue I see is that file size is that same for both of your uploads, and they are both behaving in the same unexpected manner. This makes me wonder if it is related to Google Drive and not the two files themselves. Thanks! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Files uploaded via API does not open

Hey, @BikramSahu 👋 Is this issue persisting? If so, I can try to set up a similar test. Your files are hosted in a Google Drive folder with public permissions, correct?

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes