Skip to content

Add Upload API#7

Merged
adimiz1 merged 14 commits intomasterfrom
feature/upload_api
Jul 24, 2023
Merged

Add Upload API#7
adimiz1 merged 14 commits intomasterfrom
feature/upload_api

Conversation

@adimiz1
Copy link
Contributor

@adimiz1 adimiz1 commented Jul 20, 2023

Brief Summary of Changes

This PR adds the upload API, including upload, rename and explicitly API's
Tests are yet to come.

What does this PR address?

  • GitHub issue (Add reference - #XX)
  • Refactoring
  • New feature
  • Bug fix
  • Adds more tests

Are tests included?

  • Yes
  • No

Reviewer, please note:

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I ran the full test suite before pushing the changes and all the tests pass.

console.log(error)
expect(response).toBeDefined(); // Assert that the response matches the mock response
});
// const fileToSend = await RNFS.readFile('__tests__/.resources/logo.png')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove unused comments

filename: string;
headers: [string: any];
params: [string: any];
//payload:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove unused comments

@@ -0,0 +1,696 @@
import { Transform } from 'stream';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you took it from other repo, please add a comment saying where this file is taken from, it will require sync from time to time.

return data;
}

export async function explicit(cloudinary: Cloudinary, {public_id , options = {}, config = null, callback}: {public_id: string, options?: UploadApiOptions,config: APIConfig | null, callback?: UploadResponseCallback}) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would separate public apis from internal utils

);
}

// async function uploadImage() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please finalize the sample file. Keep only relevant examples and remove irrelevant comments.

@adimiz1 adimiz1 merged commit e245492 into master Jul 24, 2023
@adimiz1 adimiz1 deleted the feature/upload_api branch July 24, 2023 08:14
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.

2 participants