Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Image in Storage Service #24

Open
praveenGrepruby opened this issue Jan 8, 2024 · 1 comment
Open

Upload Image in Storage Service #24

praveenGrepruby opened this issue Jan 8, 2024 · 1 comment

Comments

@praveenGrepruby
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants