Closed kenken64 closed 7 years ago
var oAuth2TwoLegged = new ForgeSDK.AuthClientTwoLegged(CLIENT_ID, CLIENT_SECRET, [ 'data:read', 'data:write', 'bucket:read', 'bucket:update', 'bucket:create' ], autoRefresh);
/ 20170409045551 // https://developer.api.autodesk.com/oss/v2/buckets/forge_sample2_c6eaxriflqyzvmirmt306hsmawehv9ig/objects/CCDC_HP_B4_ST_TYPICAL.rvt
{ "reason": "No read access" }
Omg its not an upload issue.
Sorry is the createBucket
Trying to upload an object
Uploading file. bucket:forge_sample_c6eaxriflqyzvmirmt306hsmawehv9ig filePath:D:/Project/bca-rvt/CCDC_HP_B4_ST_TYPICAL.rvt D:/Project/bca-rvt/CCDC_HP_B4_ST_TYPICAL.rvt buckets > [object Object] { statusCode: 401, statusMessage: 'Unauthorized' } Upload file response: undefined
fs.createReadStream(filePath).pipe(` request.put({ url:'https://developer.api.autodesk.com/oss/v2/buckets/'+bucketKey+'/objects/'+fileName, headers:{ 'Authorization':' Bearer ' + oAuth2TwoLegged.access_token }