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

Fix: storage upload for string #228

Merged
merged 1 commit into from
Feb 11, 2023
Merged

Fix: storage upload for string #228

merged 1 commit into from
Feb 11, 2023

Conversation

yevheniyJ
Copy link
Collaborator

@yevheniyJ yevheniyJ commented Feb 11, 2023

Fix for addStorage to pass file content as string

const contentString = fs.readFileSync(file, 'utf8');
const contentBuffer = fs.readFileSync(file);
//both options now will produce file with correct type
await client.uploadStorageApi.addStorage(file, contentBuffer);
//or
await client.uploadStorageApi.addStorage(file, contentString);

@yevheniyJ yevheniyJ linked an issue Feb 11, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Feb 11, 2023

Codecov Report

Merging #228 (04511ff) into master (169c6c9) will decrease coverage by 0.39%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
- Coverage   93.33%   92.94%   -0.39%     
==========================================
  Files          30       30              
  Lines        1243     1245       +2     
  Branches      105      106       +1     
==========================================
- Hits         1160     1157       -3     
- Misses         54       59       +5     
  Partials       29       29              
Impacted Files Coverage Δ
src/uploadStorage/index.ts 71.43% <50.00%> (-17.03%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yevheniyJ yevheniyJ merged commit f0937bc into master Feb 11, 2023
@yevheniyJ yevheniyJ deleted the fix-storage-string branch February 11, 2023 18:53
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

Successfully merging this pull request may close these issues.

Type issue inside addStorage
1 participant