I want to upload images into SDL 8.0 under as multimedia schema component, here end point I am using is coreservice2015. As I execute the code, I am facing "Provided access token is invalid" issue. I tried few approach where I increased ExpiresAt() time, but still does not validate the token.
Any advice is welcomed. Below is snippet that calls and upload images
byte fd = new byte[(int) file.length()]; FileInputStream inStm = new FileInputStream(file); DataInputStream dtstm = new DataInputStream(inStm); dtstm.readFully(fd); dtstm.close(); inStm.close(); IStreamUpload clientpub = coreService201501.getStreamUploadBasicHttp(); AccessTokenData td= coreService.getCurrentUser(); String icnPub = clientpub.uploadBinaryByteArray(td,fd); return icnPub;
com.sdltridion.contentmanager.coreservice._201501.IStreamUploadUploadBinaryByteArrayCoreServiceFaultFaultFaultMessage: Provided access token is invalid.