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

Uploaded media gets truncated title #981

Open
maxcynicle opened this issue Mar 4, 2024 · 0 comments
Open

Uploaded media gets truncated title #981

maxcynicle opened this issue Mar 4, 2024 · 0 comments
Assignees

Comments

@maxcynicle
Copy link

Describe the issue
I've self-hosted MediaCMS using the docker compose instructions and everything is fine and dandy. However, when I upload media, the media name on the platform gets truncated.

I have 2 videos, filenames are as follows:
"002. 1.1 Exploring Linux"
(25 characters)
"003. 1.2 Understanding Red Hat Enterprise Linux"
(48 characters)

Upon uploading, I find that the title of the first video is correctly captured whereas the title of the second video is now truncated as follows:
image

Checking the django administration portal, I find the following:
{"filename": "/home/mediacms.io/mediacms/media_files/original/user/cynix/50438b42560c4d5e90cce6f010470e96.002._1.1_Exploring_Linux.mp4", "file_size": 9549653, "video_duration": 160.852995, ...
{"filename": "/home/mediacms.io/mediacms/media_files/original/user/cynix/67f4fc36e4a846ee8f2916510c30705d.00312U1.MP4", "file_size": 4370771, "video_duration": 73.452995, ...

If I proceed to rename the 2nd video, it will store the 48 characters with no errors.

To Reproduce
Steps to reproduce the issue:

  1. Upload a video file with 48 characters in filename
  2. Observe it gets truncated
  3. Rename video on MediaCMS with same 48 characters
  4. Observe it saves fine

Expected behavior
If the media being uploaded has a very long name, it should truncate to a certain string length, instead of using 8dot3 naming convention (I'm guessing it's 8dot3). I'm guessing what is happening here is that instead of retaining the name of the file that was uploaded, it takes the filename available on the storage upon upload success. I would expect there to be changes on the storage backend if the file stored is renamed to accommodate name length restrictions on the filesystem, but the UI should retain the name during upload to store it once it has completed upload successfully.

I have over a 100 videos and they're not extremely long filenames, but it'd be a pain if I have to rename more than 50% of the media files.

Environment (please complete the following information):

  • Installation method: Docker install
  • Browser: Microsoft Edge

Additional context
Please tell me if I'm doing something wrong or this has been explained in a setting somewhere before. I've searched on this repo for about 3 days and poked around the .py files and I couldn't find a solution.

Lastly, thank you for this great product!

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

No branches or pull requests

2 participants