Jump to content

hzesen1221

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by hzesen1221

  1. Report: So I ended up modifying the core to cope with this... (yeah I know this is not a good idea but I need this to be functional for my Chinese clients) In WireUpload.php line 240 I added: $filename = 'file-' . $filename; after: $filename = $this->getTargetFilename($filename); $filename = $this->validateFilename($filename); This will force every file uploaded to start with a 'file-' prefix so that the system will not have files with a filename consisting Chinese characters only. However I ran into another problem: If I upload 'test.jpg', I get 'file-test.jpg' which is good. But if I upload '未命名.jpg', I get 'file-' instead, missing the extension. Then, if I upload '未命名.jpg' again, I get 'file--1.' again missing the extension but with a trailing dot... This inconsistency is really just weird to me. For English filenames I got the extension, for the first Chinese filename I got the filename without the extension. And if I upload another file of Chinese filename, I got the filename and the dot (e.g.: file--1. ) Despite all this, I can still view these files as images in my browser, so ...../file-test.jpg , ...../file- , ........../file--1. all display the image without any error. If I insist I need to modify the core in order to make this work (before any official fix is available). Where is the best place to do so? The way I did it works in some sense but produces all these weird filenames which are not really desirable. Anyone familiar with the core willing to help out here? Thank you so much in advance!
  2. I tried another hosting but unfortunately I am getting the same error. I might need to fall back to Perch CMS for this upcoming project then, which I think does less for more (although it's indeed easier than Processwire to set up in my opinion). I will come back and dig a little bit more into this issue in the future. Thanks for all your help! And please keep me posted if any solution is found
  3. I am actually running the latest stable version that I downloaded a few days ago, which I believe is 2.5.2. After a fresh installation I am still getting this error: 名未命.png - Unable to move uploaded file to: /var/www/.......... Maybe I should try the latest dev version as well however I don't think that's gonna make a difference though... Do you guys have any idea regarding to why this is happening to share with me? I would really appreciate any inputs!
  4. Hello Adrian. Thanks for your answer! However I'm still not quite sure what you were suggesting.. Could you please elaborate a little bit more? I looked into that cleanBasename function and sort of understand what it does / what its purpose is. I'm pretty sure you are not suggesting that I should modify this core function right? Thank you very much.
  5. Update: If the image's filename contains ONLY Chinese characters I got the same error as before. However, if it has any ascii character in it (eg: numbers, letters, punctuation), for example: “未命名-1.jpg”, the module will kick in and rename the uploaded file name for me. Could anyone explain this phenomenon to me? Thank you very much. Zesen
  6. Hello Ivan thanks for your help. I actually tried that module before posting this thread. Unfortunately it did not work for me. For files with English names it worked like a charm. However that is not my problem here. For files with Chinese names I still got the same error. And hello Pwired (and anyone else). I am the owner of a small web development firm here in China. However I studied in the U.S. for the last five years so I am exposed a lot to all these 'foreign technologies' and we used these tech exclusively to differentiate ourselves. My company is currently using CouchCMS to develop sites for clients. However I am looking for another more extensible alternative and I found Processwire. I just have to make sure that it will work properly for my clients.
  7. I tried uploading an image with an English filename which went through perfectly fine. Then I copied and pasted the same exact file and gave it a Chinese name instead. Next I attemped to upload this image however I got this error message: "Unable to move uploaded file ..." I am not sure how to solve this problem. Any help would be greatly appreciated!
×
×
  • Create New...