Ticket #248 (closed enhancement: fixed)
QfileAsset - introduction to $strRandomFileName
| Reported by: | voyager123bg | Owned by: | somebody |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.1 |
| Component: | QForms | Version: | 1.0.0 Stable |
| Keywords: | QfileAssetBase | Cc: |
Description
I've noticed the following code (lines 95-98) in QfileAssetBase?
// Save the File in a slightly more permanent temporary location $strTempFilePath = $this->strTemporaryUploadPath . '/' . basename($this->dlgFileAsset->flcFileAsset->File) . rand(1000, 9999) . '.' . $strExtension; copy($this->dlgFileAsset->flcFileAsset->File, $strTempFilePath); $this->File = $strTempFilePath;
What I'm proposing is to introduce new string in the QfileAssetBase? - $strRandomFileName
so the code becomes:
// Save the File in a slightly more permanent temporary location $strRandomFileName = basename($this->dlgFileAsset->flcFileAsset->File) . rand(1000, 9999) . '.' . $strExtension; $strTempFilePath = $this->strTemporaryUploadPath . '/' . $strRandomFileName; copy($this->dlgFileAsset->flcFileAsset->File, $strTempFilePath); $this->File = $strTempFilePath;
Also, $strTempFilePath should be included in the beginning of QFileAssetBase.
At the end of the day, we will have access to the randomly-generated file name (by Qcubed). I will make it to a patch and submit it for your review.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
