You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

bossgolfer's avatar
bossgolfer
Helpful | Level 5
2 months ago

API Upload .HEIC and convert to JPG

I am using the API to upload images and make them public. I get the public link back and embed in my application. ALL GOOD.

Now I am looking to allow .HEIC uploads. I don't see anything in the API to cause the conversion. So, I put automation on my parent folder and that seems to create another duplicate photo converted to JPG. At that point I assume I have lost the public link and I have duplicate files. 

I am looking for any pointers here.....

 

thanks in advance.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The Dropbox API accepts uploads of files of any type (including both but not limited to jpg and heic). The Dropbox API does not do file conversions for you, but as you found you can manually set up automations on dropbox.com.

     

    Using automations doesn't change how the Dropbox API works. If you wish, you can still use the Dropbox API to create shared links for any particular file, whether that's a file you uploaded using the API, or a file created via an automation.

     

    If you want to use the API to detect the creation of new files, check out the Detecting Changes Guide.

    • bossgolfer's avatar
      bossgolfer
      Helpful | Level 5

      yes, thanks. I saw that it can be done, but it does seem to break the workflow for the end user that way. My current workflow lets user upload in the Salesforce UI and part two is to make and return the public link then I store that in Salesforce. Using folder automation, I am guessing I would have to know that its has run and created a new file. How do I know which file is correct and I assume I would have to maybe listen for an event etc. All messy as far as the workflow goes. I was HOPING I could either set the automation to REPLACE the HEIC with the JPG and keep the SHARE...or tell the Upload to Convert it OR have a Viewer URL option to say covert. Seems like a broken play to me right now unless I am missing something on the implementation you are suggesting (thank you Apple)

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        That's correct, the API itself only accepts the upload of whatever data you send. It does not offer conversions or report back on any automations that may be running in the folder. The automation does not replace the original file, so if you want a link to the converted file, you'll need to detect the creation of that file and then get a link to that.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,882 PostsLatest Activity: 12 hours ago
325 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!