rusbrain / reps2_beta1

кузы2
http://reps2.ru
GNU General Public License v3.0
11 stars 5 forks source link

Adding replays in admin panel not working #196

Closed rusbrain closed 5 years ago

rusbrain commented 5 years ago

Screenshot

widedeveloper commented 5 years ago

do we need to keep blank for that field if necessary ?

widedeveloper commented 5 years ago

actually that was required fields, but we can leave empty for this fields when submit form ? here (also creating replay on front)

rusbrain commented 5 years ago

please advise when this field was made necessary? If it is an uploaded rep file, then YouTube link is not necessary

widedeveloper commented 5 years ago

I fixed this issue.

rusbrain commented 5 years ago

@widedeveloper u fixed what?? Screenshot

rusbrain commented 5 years ago

I can't add VOD as well, lol Screenshot

fun4life1990 commented 5 years ago

@rusbrain I changed the form only on the frontend part. I’ll fix this asap.

Now the logic is this:

  1. On the form, the file is loaded via ajax. If there are no errors, the id of the uploaded file is returned back with the shared data for the replay (race, location, map id etc.)
  2. When successfully saving the replay, the id of this file is attached to this replay.
  3. Periodically saved files that were not attached to any replay will be deleted. This is done in case the person uploaded the files, but did not save the replay.
rusbrain commented 5 years ago

@fun4life1990 .rar, .7z, .zip archives are impossible to upload now. As well as Youtube/ Twitch/ Afreeca videos (VODs).

fun4life1990 commented 5 years ago

@rusbrain I have created PR with latest changes for replay. I added new fields like players names and APMs and game date. I added them only for admin panel so you can check new functionality and send me your response. After that I will add these fields to front.

Also I could upload archives since now.

rusbrain commented 5 years ago

@fun4life1990 Replay upload still not working

rusbrain commented 5 years ago

@fun4life1990 I can't upload archives

widedeveloper commented 5 years ago

@rusbrain , I just updated server again, Please check now

rusbrain commented 5 years ago

@widedeveloper Please check yourself, and post a screenshot, that you are able to submit archives. Thanks.

widedeveloper commented 5 years ago

okay I updated server and restart but not working the uploading @fun4life1990 , it's working on your local dev environment correctly ?

ghost commented 5 years ago

There is an actual bug with .rar files upload It happens on client-side MIME re-validation with dropzone.js

ghost commented 5 years ago

There is also a weird bin name collision commit | file | current bin path Please either change that path in service or the binary name to match

ghost commented 5 years ago
  1. Uncompressed/multipart MIME headers were missed in the whitelist
  1. Replay size restriction is currently in server's internal model. Maybe it should be moved into DB for possible interaction through admin UI
  1. Not matched bin path
  1. Unpublished replays still remain in server storage. Please let me know if there is supposed to be any particular use of this. Other way that's a bug and should be fixed

Please clear client-/server-side cache and re-insure the fix

fun4life1990 commented 5 years ago

@nl169 I wrote cli-command for cleaning db from unpublished replay files replays:clean_files

rusbrain commented 5 years ago

@fun4life1990 Replay archive upload still not working. Would you consider a button or alike option to change the uploader from the previous format (all-manual data) and automatic format (parsed data). All-manual would have allowed adding archives and many more.

fun4life1990 commented 5 years ago

@rusbrain Could you please give me archive which you upload, so i could reproduce this?

rusbrain commented 5 years ago

@fun4life1990 shared via upwork