We have a downloadName
field that was introduced on the record
and folder
tables. The goal of this field is simply to ensure that each file has a unique name with which it can be downloaded.
Permanent supports duplicate display names. In other words you can have two files named My File.txt
and My File.txt
in the same folder. That is not a problem in Permanent because the file id
's differentiate them.
However, other file systems such as the one on windows or mac would not allow duplicate names in thesame folder. That's why we added this field.
Hence, the purpose of this document is to guide you on how to test whether the downloadName
field is getting the correct values.
-
git fetch origin PER-8610-fix-generate-download-name-bug
from this PR -
Checkout that branch
-
Have a running local instance and be able to ssh (
vagrant ssh
) into your local VM -
Obtain the mysql login credential (The details which I could provided in the chat)
-
Be able to login to the sql instance within the VM
-
select recordid, displayName, downloadName, status from record
&&select folderid, displayName, downloadName, status from folder
should be able to show you the information you need to test the downloadName feature correctly. You can useWHERE CAST(displayDT AS DATE) = CAST(curdate() AS DATE)
to get only the files/folder done today for the sake of simplicity.
- Upload a bunch of files with thesame : In this test you would check if upload itself is working and the instructions above would help you verify if the uploaded files have different downloadNames.
- Create a folder with a name that is exactly like that of one of your files in the same location (folder). For example if you have a file name
photo.png
on your system create a folder namephoto.png
on permanent and in the same directory wherephoto.png
lives upload the filephoto.png
: In this test, you check that files and folders with thesame displayname in one directory would have different downloadNames.
Test that you can do the following updates:
- Rename a file/folder or update
displayName
- Update file/folder decription
- Change file/folder date.
- Update tags
-
Upload a file named
something.something
a couple times. Then another document calledsomething.something.doc
verify that the downloadName in the db issomething.something.doc
-
Upload file named
2022.04.07.txt
check that its properties in the database are as follows -displayName
is2022.04.07
-uploadFileName
is2022.04.07.txt
-downloadName
is2022.04.07.txt
-
Upload the same file in the same directory and then check that the new files had the following db characteristics. -
displayName
is2022.04.07
-uploadFileName
is2022.04.07.txt
-downloadName
is2022.04.07 (1) .txt
-
Upload file named
sneaky.txt(1)
Verify that thedisplayName
stayssneaky.txt(1)
and thedownloadName
generated isstays
sneaky.txt(1). -
Upload another file still named
sneaky.txt(1)
Verify that thedisplayName
stayssneaky.txt(1)
and thedownloadName
.
This is only a guide to give you context and assist you with some quick tips, please take any other action you would take during your normal reviews.