Imgur API Version 3 JavaScript upload example

前端 未结 1 850
轮回少年
轮回少年 2021-01-31 06:06

All the examples I find online are of earlier versions of the Imgur API or non JS code all of which uses an API key which doesn\'t exist in the newer API. Instead you get a

相关标签:
1条回答
  • 2021-01-31 06:20
    $.ajax({ 
        url: 'https://api.imgur.com/3/image',
        headers: {
            'Authorization': 'Client-ID YOUR_CLIENT_ID'
        },
        type: 'POST',
        data: {
            'image': 'helloworld.jpg'
        },
        success: function() { console.log('cool'); }
    });
    
    0 讨论(0)
提交回复
热议问题