Skip to content

Upload externally hosted media resources

Campbell Allen edited this page Jul 20, 2016 · 2 revisions

Externally hosted images can be uploaded using the client as well. Just append the mime type and the location for each media resource to the subject locations.

Take note that the external URL must use the secure https protocol and the media resource MIME type is an approved one, currently: .jpg, .jpeg, .png, .gif, .svg.

subject = Subject()
subject.locations.append({'image/png': 'https://example.com/image.png'})
subject.save()