Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

bossgolfer's avatar
bossgolfer
Helpful | Level 5
2 years 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.

7 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    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
    2 years ago

    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 Community Moderator rankDropbox Community Moderator
    2 years ago

    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.

  • bossgolfer's avatar
    bossgolfer
    Helpful | Level 5
    2 years ago

    Hmm.. not ideal. If you all have an ideas/enhancement request system please consider adding a request for a more seamless/flowing handling of being able to tell the upload API to convert this HEIC file automatically upon upload or something similar. Thanks for the response. D

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Thanks for the feedback! I'll pass it along, but I can't promise if or when that might be implemented.

  • bossgolfer's avatar
    bossgolfer
    Helpful | Level 5
    2 years ago

    Maybe I am the only on who cares, but for me updating the API to handle the conversion is critical. I know there are a lot of API vendors out there offering HEIC to JPG and if Dropbox simply added this flow as callable by the API and allow the return file handle that would be AWESOME. One more reason to keep everything in the DROPBOX world. Obviously you all have the code there. Please consider opening up the API for it.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    2 years ago

    Thanks for the additional feedback!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

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, Facebook or Instagram.

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!