Skip to content

Commit

Permalink
fix: changed variable name casing
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkothari22 committed Sep 23, 2023
1 parent 8cc1e04 commit cae9c29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/file/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class FrappeFileUpload {
* @param {VoidFunction} onProgress file upload progress
* @returns Promise which resolves with the file object
*/
async uploadFile<T = any>(file: File, args: FileArgs<T>, onProgress?: (bytesUploaded: number, totalBytes: number) => void, api_path: string = 'upload_file') {
async uploadFile<T = any>(file: File, args: FileArgs<T>, onProgress?: (bytesUploaded: number, totalBytes: number) => void, apiPath: string = 'upload_file') {
const formData = new FormData();
if (file) formData.append('file', file, file.name);

Expand Down Expand Up @@ -71,7 +71,7 @@ export class FrappeFileUpload {
}

return this.axios
.post(`/api/method/${api_path}`, formData, {
.post(`/api/method/${apiPath}`, formData, {
onUploadProgress: (progressEvent) => {
if (onProgress) {
onProgress(progressEvent.loaded, progressEvent.total);
Expand Down

0 comments on commit cae9c29

Please sign in to comment.