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

Does static plugin supporting URL decoding ? #15

Closed
Renishgotecha opened this issue Oct 17, 2023 · 5 comments
Closed

Does static plugin supporting URL decoding ? #15

Renishgotecha opened this issue Oct 17, 2023 · 5 comments
Assignees

Comments

@Renishgotecha
Copy link
Contributor

Issue Description: Unable to fetch a file from the specified URL

I have encountered an issue while trying to fetch a file from my project's file structure. I have attached a screenshot of the file structure for reference.
Screenshot from 2023-10-18 01-02-18

However, when I call the following URL: http://localhost:3000/public/downloads/pdfs/2023_10_16/hey/Certificates/Confirmation%20of%20Cancellation/0_confirmation_of_cancellation_.pdf, it returns a NOT_FOUND error.

Expected Solution:

To resolve this issue, I would appreciate any guidance or assistance. Here is the relevant code snippet from my index.ts file:

const app = new Elysia()
.use(cors())
.use(staticPlugin())
.use(uiRoute)
.listen(+`${PORT}`);

Please let me know if there are any changes or additions I need to make to this code in order to successfully fetch the file. Thank you in advance for your help!

@sagarAgravat
Copy link

Yes, I got the same issue.....

@Cometi951
Copy link

Just week ago, facing same problem at my end.

@Renishgotecha
Copy link
Contributor Author

Guys, Don't worry i figure out the solution for this feel free to discuss. just checkout below pull request

#16

@bogeychan
Copy link
Collaborator

bogeychan commented Dec 18, 2024

Thanks for reporting this finding!

It's blocked by elysiajs/elysia#944

You've to use the enableDecodeURI option from @Renishgotecha and set alwaysStatic: false for now.

@bogeychan
Copy link
Collaborator

This should be fixed with elysia 1.2.13

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 a pull request may close this issue.

4 participants