I'm currently using plupload module version 7.x-1.0, and I'm using it in multilingual website (english, arabic) when I'm on the English interface everything is normal and working fine, but in the arabic interface, when I upload an image with arabic name (multibyte language) I got error about the file extension, and after tracing I found :
...
$value = rtrim(basename($value), '.');
...
in line 152, plupload.module, basename() is locale aware that mean that we have to tell it which language it should use before we call it, but here I tried the best solution for me here as I'm using translitration module, I just patched the module and moved transliteration_clean_filename() function to be before basename() call, the attached patch do this, please if there is better way to do this please inform me about it.
Thanks,
Ma'moun othman
Comment | File | Size | Author |
---|---|---|---|
#3 | move_transliteration_plupload_1890072.patch | 1.1 KB | slashrsm |
basename_issue_with_filename.patch | 1.02 KB | artofeclipse |
Comments
Comment #1
slashrsm CreditAttribution: slashrsm commentedHm.. the same code is currently located ~40 lines below. Would it make sense to move it up before basename()?
What error exactly do you get?
Comment #2
artofeclipse CreditAttribution: artofeclipse commentedSorry my is not clean I just moved the transliteration_clean_filename() function before the basename() function, the file I tried to upload is named in arabic and because of that the name get removed on execution of basename() on it, All what I did in my patch is I moved the code before the basename() function execution.
Comment #3
slashrsm CreditAttribution: slashrsm commentedWould this work?
Comment #3.0
slashrsm CreditAttribution: slashrsm commentedremove the arabic image text, cause the image can't be uploaded.