-
Notifications
You must be signed in to change notification settings - Fork 358
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
Cannot End Filename In Variable #48
Comments
I don't understand what you mean. This: $var = 'test';
$handle->file_new_name_body = "img_{$var}"; Is the same as this: $handle->file_new_name_body = "img_test"; So the fact that there is a variable interpolation doesn't matter. And then, if you have: $handle->file_new_name_body = "img_test"; You get as images: img_test.jpg
img_test_1.jpg
img_test_2.jpg... Or, if you have: $handle->file_new_name_body = "img_test_"; You get as images: img_test_.jpg
img_test__1.jpg
img_test__2.jpg... I don't see where the problem is... |
I never get an upload named:
It's always
and so on. Additionally, if I set
Then nothing is saved at all.
|
Can you copy here the logs produced by the class for each of your attempts you are describing above? |
I just got this to work by removing the call to
|
This shouldn't have an effect. Can you copy here the logs produced by the class, with and without |
Can you tell me how to get the log contents? I can't see anything in the docs about logging? Thanks. |
Just add this at the end of your code: |
I got the same problem. $handle-> clean(); solved the problem |
This issue occurs when you try to save a filename ending in a variable.
The following does not work:
But this does work:
In the first instance, the class tries to rename the filename by appending an integer suffix;
_1
,_2
and so on, between the supplied filename and the file extension. In the above example, if the value of $var = 'test'; the resulting filename will be img_test_1.jpgIf I set the option:
then the file is not saved at all.
The text was updated successfully, but these errors were encountered: