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

feat: uploading files in sas request #23

Merged
merged 13 commits into from
Oct 19, 2021
Merged

feat: uploading files in sas request #23

merged 13 commits into from
Oct 19, 2021

Conversation

medjedovicm
Copy link
Member

No description provided.

@allanbowe
Copy link
Member

Perhaps we should add prettier as a pre-commit hook?

.gitignore Outdated Show resolved Hide resolved
src/routes/index.ts Outdated Show resolved Hide resolved
src/routes/index.ts Outdated Show resolved Hide resolved
src/utils/upload.ts Outdated Show resolved Hide resolved
src/utils/upload.ts Outdated Show resolved Hide resolved
src/utils/upload.ts Outdated Show resolved Hide resolved
src/utils/upload.ts Outdated Show resolved Hide resolved
src/utils/upload.ts Outdated Show resolved Hide resolved
@@ -24,3 +24,7 @@ export const generateUniqueFileName = (fileName: string, extension = '') =>
new Date().getTime(),
extension
].join('')

export const addExtensionIfNotFound = (value: string, extension: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure that I understand the purpose of this utility.
And probably you wanted to test, if value ends with ., becase it is possible to create file.file.txt on unix systems.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok good point, I will use regex. Purpose is that you don't need to provide extension in _program parameter since official SASStoredProcess does not require it.

Copy link
Member

Choose a reason for hiding this comment

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

hmm - we should ALWAYS just add the ".sas" extension. No need for a utility.

Copy link
Member Author

Choose a reason for hiding this comment

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

I found a good approach. I will also write the tests.

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @allanbowe and we should just add .sas if needed

Copy link
Member Author

Choose a reason for hiding this comment

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

We still need utility to check if extension not there, to be added

src/routes/index.ts Outdated Show resolved Hide resolved
@YuryShkoda YuryShkoda merged commit a1de0ae into master Oct 19, 2021
@YuryShkoda YuryShkoda deleted the issue16-session branch October 19, 2021 10:45
@allanbowe allanbowe linked an issue Nov 9, 2021 that may be closed by this pull request
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.

support request file inputs
3 participants