# Veel verzoeken verzenden voor video/audio-upload tijdens het bewerken van een bericht

**URL:** <https://meta.discourse.org/t/sending-many-requests-for-video-audio-upload-while-editing-post/161487>\
**Category:** Bug\
**Created:** [20 augustus 2020 om 08:48 UTC](https://meta.discourse.org/t/sending-many-requests-for-video-audio-upload-while-editing-post/161487 "2020-08-20T08:48:22Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![kkurdupov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kkurdupov/32/191014_2.png) [@kkurdupov](https://meta.discourse.org/u/kkurdupov)\
**Post date:** [20 augustus 2020 om 08:48 UTC](https://meta.discourse.org/t/sending-many-requests-for-video-audio-upload-while-editing-post/161487/1 "2020-08-20T08:48:22Z")

</div>

Hello everyone! I would like to submit a bug.  
Reproduced on v2.4.5, v2.5.0.

### Prerequisites

- Create a post with a video/audio upload in it.
- I have tested it with secure media upload, but should be reproduced with not secure media.
- Start edit the post.
- Open browser’s developer console. Optionally, set filter for upload API.
- Wait for all requests finished and clear console.

### Steps to reproduce

- Type anything in left(editing) area.
- Check browser’s dev console.

### Actual result

- Every keystroke is considered change so simplify typing is constantly creating video upload events.
- A lot of changes will cause sending massive of requests, then **denying requests** because of API Rate Limit and **auto signing out** of forum.

### Expected result

- No requests for audio/video upload while **editing post**

See the gif:

 ![post-editing](https://global.discourse-cdn.com/meta/original/3X/b/4/b4db25fe383dac62a8fb8146806d03a591fe0fb2.gif)

## Note about the bug:

[This line](https://github.com/discourse/discourse/blob/0967ce478d85ad5053522944b36ed9212f867457/app/assets/javascripts/pretty-text/addon/upload-short-url.js#L152) produces the bug. It calls **load** function of \<video\>/\<audio\> DOM element each time on preview rendering, in fact each time of a post change.

---

_[View the full topic](https://meta.discourse.org/t/sending-many-requests-for-video-audio-upload-while-editing-post/161487)._
