I have followed documentation guide for uploading a file and tried the same
Uploading Files - Canvas LMS REST API Documentation (instructure.com)
In canvas, my file is uploaded, but image is not appearing as original file
Attached my canvas file SS and postman requests
Solved! Go to Solution.
I reached out to our team about this, and we were seeing with Avatars, we have to whitelist domains if we are trying to upload a URL into our profile picture. If you file a support ticket with Canvas Support, we should be able to make sure we are making the correct API call, and are able to whitelist any domains needed to be able to upload a file via API into the profile pictures folder. Please open a support ticket and we should be able to help with that. https://community.canvaslms.com/t5/Canvas-Basics-Guide/How-do-I-contact-Canvas-Support/ta-p/389767
Hello @Heman
Thanks for reaching out in the Community!
I was trying to make the same API call you were, and trying to POST an image stored in Gravatar to upload to my user files. I was able to see Postman return a progress url indicating there was an upload triggered, but I was not able to see the file coming across into my user files area.
Other community members might see what is wrong and be able to correct this, however, I would suggest reaaching out to our Canvas support team as they should be able to investigate further about how best to do this. https://community.canvaslms.com/t5/Canvas-Basics-Guide/How-do-I-contact-Canvas-Support/ta-p/389767
Hope this helps!
I reached out to our team about this, and we were seeing with Avatars, we have to whitelist domains if we are trying to upload a URL into our profile picture. If you file a support ticket with Canvas Support, we should be able to make sure we are making the correct API call, and are able to whitelist any domains needed to be able to upload a file via API into the profile pictures folder. Please open a support ticket and we should be able to help with that. https://community.canvaslms.com/t5/Canvas-Basics-Guide/How-do-I-contact-Canvas-Support/ta-p/389767
Hi cstrikwerda
Thanks for the update, I could see that the issue is with the root directory where my image resides. When I changed the path of the image to the path the postman has been installed, it worked for me
Thanks.