This topic is locked

Name change by files uploading

6/18/2020 3:36:17 PM
PHPRunner General questions
S
Studionova author

In PHPRunner manual in Topic Rename uploaded file we can read: "Each file uploaded to the disk has two names: display name, that you can see on the site, and physical file name on the disk."
By uploading some characters are added and after downloading these added characters are in filename. Is there any function in PhpRunner to remove these added characters by downloading?
I need after uploading and downloading the original filename.
Can any help me plis to solve this problem?
miran

Sergey Kornilov admin 6/18/2020

Miran,
what exactly is the problem?
Additional characters are added to the file name to prevent files from being overwritten if someone uploads the file with the same name.

S
Studionova author 6/19/2020



Miran,
what exactly is the problem?
Additional characters are added to the file name to prevent files from being overwritten if someone uploads the file with the same name.


This with uploading and storing is ok, but I need later, after uploading, to send this file as mail attachment. It works fine, but this added characters in filename are then confused for the mail receiver. It is much better if you send to somebody mail with attached file e.g. CONTRACT.PDF as CONTRACT_sdfjskj.PDF

Sergey Kornilov admin 6/19/2020

I see what you saying. You have two options here.

  1. Use Basic upload control and risk files being overwritten.
  2. Or create a copy of the file with a "normal" name in the temporary folder, attach it and then delete it afterwards.

S
Studionova author 6/19/2020



I see what you saying. You have two options here.

  1. Use Basic upload control and risk files being overwritten.
  2. Or create a copy of the file with a "normal" name in the temporary folder, attach it and then delete it afterwards.


Thanks for the hints.

  1. Basic upload is limited to only one file. That is for customer not enough <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=91765&image=1&table=forumreplies' class='bbc_emoticon' alt=':(' />
  2. I will try to use this solution. I hope I can realize this <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=91765&image=2&table=forumreplies' class='bbc_emoticon' alt=':)' />
    Thank you Sergey