File Manager will upload the same file multiple times
joeljfischer opened this issue · 0 comments
joeljfischer commented
Bug Report
When trying to load multiple of the same artwork and the file is not uploaded yet, the file will be uploaded multiple times. This is because we create multiple of the same upload operation and they all execute.
We should probably implement the upload / delete operation to check if the file needs to be uploaded at the time it would run instead of the manager figuring out if the operation should be created at all.
Reproduction Steps
- Create 99
SDLArtwork
s that are exactly the same - Attempt to upload all 99 in a loop
Expected Behavior
The one artwork will be uploaded 99 times, slowing down the head unit like crazy.
Observed Behavior
The one artwork should only be uploaded 1 time.
OS & Version Information
- iOS Version: [What version of iOS are you using when the bug occurred]
- SDL iOS Version: [What version of the library has this bug been seen on]
- Testing Against: [What you tested with to observe this behavior]
Test Case, Sample Code, and / or Example App
[Paste a link to a PR, gist, or other code that exemplifies this behavior]