Bhupesh-V / tutorialdb

A search 🔎 engine for programming/dev tutorials,
MIT License
121 stars 60 forks source link

fix URL error when submitting long links #39

Closed Bhupesh-V closed 4 years ago

Bhupesh-V commented 4 years ago

Describe the bug If we Contribute a link with more than 200 char length, its throwing up error.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://tutorialdb-app.herokuapp.com/contribute/
  2. Paste a legit link with more than 200 character length.
  3. Press Submit.
  4. See error.

Additional context Fixing the model tag would fix the issue.

gunjanraval commented 4 years ago

Can you give an example link?

iflare3g commented 4 years ago

Hi, I'll fix it. URLField has max_length set to 200 by default.

Animesh-Ghosh commented 4 years ago

Wouldn't it be better to have the submitter shorten the link? Since URI lengths can be unlimited and certain browsers can only support URIs with length upto 2k characters?

This seems like an informative thread regarding this issue.

iflare3g commented 4 years ago

At the moment , I've limited it to 300 chars.