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

Invalid file name #41

Open
mostafaznv opened this issue May 7, 2018 · 15 comments
Open

Invalid file name #41

mostafaznv opened this issue May 7, 2018 · 15 comments

Comments

@mostafaznv
Copy link

mostafaznv commented May 7, 2018

Hi,
thanks for your nice package.

I have a problem with returned $filePath from onFinalized()
PATH_TO_FILE\...\videos\FC_Barcelona_vs_FC_Bayern_Munich_2015_(Champions_League_semi-final_Himno,Anthem ).3gp

can you see spaces after ')' ?
It seems is not usual parentheses ) as we know
I can't generate link to the file! browser return 404 error

original video:
https://www.youtube.com/watch?v=sMq_A0ETURQ

@masihyeganeh
Copy link
Owner

Obviously this is related to pathSafeFilename function.
There are many possibilities for this to fail, including some non-English characters, some emojis and spaces.
PR is always welcome if you would. but there in Filename Sanitizing part of Readme, there is a way to change that function from outside of class. take a look at it.

@mostafaznv
Copy link
Author

oh sorry!
I didn't see it. I will work on it and if I found a better solution, I will send a pull request.

I have another request about this package!
is there any way to change cache directory? I mean we can set video and cache directory as second and third parameters of __construct

many thanks.

@mostafaznv
Copy link
Author

Hi again
I implemented a custom sanitizing function for my own project.
in my function, I convert all non-english characters to the same character in english (if you set default language to fa or ar, conversion will be disabled)

feel free to change any part of my code, if you don't like it

@mostafaznv
Copy link
Author

any updates?

@masihyeganeh
Copy link
Owner

Could you test it again with the latest version?
Now using UTF8 package.

@mostafaznv
Copy link
Author

mostafaznv commented Jul 16, 2018

I tested it with latest version (2.9.1)

but unfortunately file name generated with
without any success

@masihyeganeh
Copy link
Owner

Please give me link to that video

@mostafaznv
Copy link
Author

@mostafaznv
Copy link
Author

any updates?

@masihyeganeh
Copy link
Owner

screen shot 1397-08-06 at 3 12 01 pm

It is working in my PC

@mostafaznv
Copy link
Author

yt

As I said before, the problem is that ending parentheses.

please check attached image and link

@masihyeganeh
Copy link
Owner

As you can see, it is downloading the file and no error happened

@mostafaznv
Copy link
Author

Yes I know. it downloaded for me too. but I can't generate download link for that in my website!
because file name has unknown characters for browser and browser return 404!

@masihyeganeh
Copy link
Owner

masihyeganeh commented Oct 28, 2018 via email

@mostafaznv
Copy link
Author

screen shot 1397-08-06 at 10 08 21 pm

No. It's ending parentheses but I don't know the encoding of character. Please look at picture, It's a unit character I selected.

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