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 file extension validation #705

Conversation

sourabpramanik
Copy link
Contributor

@sourabpramanik sourabpramanik commented Jan 3, 2024

What does this PR do?

This PR fixes the file input upload extension validation in create function. First found in the create function step 2.
fix

Test Plan

Manual test

Related PRs and Issues

Fixes #7362

Have you read the Contributing Guidelines on issues?

YES

Copy link

vercel bot commented Jan 3, 2024

@sourabpramanik is attempting to deploy a commit to the appwrite Team on Vercel.

A member of the Team first needs to authorize it.

@sourabpramanik sourabpramanik changed the title Bug 7362 file extension validation Fix: #7362 file extension validation Jan 3, 2024
@stnguyen90 stnguyen90 self-requested a review January 4, 2024 01:30
Copy link

vercel bot commented Jan 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
console-cloud ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 9:12pm
console-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 9:12pm
console-preview-cloud ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 10, 2024 9:12pm

Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

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

Hmm, I tested this but was able to add an invalid file by dragging and dropping:

image

@sourabpramanik
Copy link
Contributor Author

Interesting. I will look into this again and make required changes. Thanks for pointing that out ✌️

@sourabpramanik sourabpramanik changed the title Fix: #7362 file extension validation Fix: #7362 file extension validation in create function Jan 9, 2024
@sourabpramanik
Copy link
Contributor Author

Hey @stnguyen90 , I see you are checking the storage file upload but this issue was not found in storage. It was found in create manual Function step 2. You can check the gif I added to the PR.

Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

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

@sourabpramanik here's the same in the create manual function wizard:

image

@sourabpramanik
Copy link
Contributor Author

Hmm gotta check that again I was unable to reproduce this last time. Thanks for pointing that out.

@stnguyen90
Copy link
Contributor

@sourabpramanik, any update on this?

@sourabpramanik
Copy link
Contributor Author

@sourabpramanik, any update on this?

Yes done

src/lib/elements/forms/inputFile.svelte Outdated Show resolved Hide resolved
src/lib/elements/forms/inputFile.svelte Outdated Show resolved Hide resolved
@TorstenDittmann TorstenDittmann merged commit 7ab1c4d into appwrite:main Apr 15, 2024
5 checks passed
@stnguyen90 stnguyen90 changed the title Fix: #7362 file extension validation in create function Fix file extension validation in create function Apr 24, 2024
@stnguyen90 stnguyen90 changed the title Fix file extension validation in create function Fix file extension validation Apr 24, 2024
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.

🐛 Bug Report: Able to move to next screen after selecting wrong file extension for Function
3 participants