Hello,
I have to upload image on storage service and I need to upload it in buffer in nodejs .
I am using following code
let newObsClient = new ObsClient({
access_key_id: config.get('storageService.accessKey'),
secret_access_key: config.get('storageService.secretKey'),
server : config.get('storageService.url')
});
const res = await newObsClient.putObject({
Bucket : config.get('storageService.bucket'),
Key : fileName,
Body: profileImage.buffer,
ContentType: 'image/jpeg',
EncodingType: 'binary',
});
I have also used some other methods to upload it , Please can anyone help here.
Thanks
Hello, I have to upload image on storage service and I need to upload it in buffer in nodejs .
I am using following code let newObsClient = new ObsClient({ access_key_id: config.get('storageService.accessKey'), secret_access_key: config.get('storageService.secretKey'), server : config.get('storageService.url') }); const res = await newObsClient.putObject({ Bucket : config.get('storageService.bucket'), Key : fileName, Body: profileImage.buffer, ContentType: 'image/jpeg', EncodingType: 'binary', });