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

Support custom filenames #226

Closed
wants to merge 3 commits into from

Conversation

erickjth
Copy link

Summary

The goal of the update is to allow using a custom file name in the upload request. Sometimes it is useful to use a different name from the original file name.

This update includes some logic in the native code (android/iOS) to use a custom file name at the time of creating the request.

Also, it includes a new setting in the uploader { customFilename: string }. This PR also updates the README file.

Test Plan

What's required for testing (prerequisites)?

Just include the customFilename into the options.

const options = {
  url: 'https://myservice.com/path/to/post',
  path: 'file://path/to/file%20on%20device.png',
  method: 'POST',
  field: 'uploaded_media',
  customFilename: 'new_filename.png',
  type: 'multipart'
}

Compatibility

OS Implemented
iOS
Android

@reime005 reime005 closed this Aug 26, 2021
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.

None yet

2 participants