New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OJS3] Filename problems #2003
Comments
This problem is a general problem and is not due xml import. I will add a different issue. Edit. Since this is in milestone, I add information here. 1. No filename set on public downloadIf the download is triggered from a readers view, ojs does not specify a filename. This can be solved by adding the line
to 2. getClientFileName() is not capable of handling some extensions
This wrong behaviour happens also on generating server-side filenames. 3. Use original filename insteadI adopted |
No this is a general problem, I think, that the file names are saved only with the 'wrong' ending, e.g. |
I came to the same conclusion, while patching the code. My solution was
Another suggestion is to change the pkp naming scheme to a prefix scheme. This would circumvent all problems with file endings. Currently If fiddling with the server side file naming scheme is to much for a minor release, |
I believe we cannot use the original name, especially not in the backend, because the users could use unanonymized names... Thus I will have to take a look... |
It would be a mistake (I think) to alter server-side filenames in the general case -- though it might be good to correct incorrectly-suffixed double-barreled suffixes (e.g. There seems to be general confusion about how to handle compound extensions. See exhibit 1 and exhibit 2. The I would suggest adding a special case for filenames ending in |
Is this the reason for building this complex workaround? Can't we assume that users who are able to avoid name leakage within a file also can set an anonymized filename? What about the case, where non original filenames render the workflow into a nightmare? I talk about software packages, where (a) the filename is the name of the package or (b) a script for reproduction assumes specific filenames on i.e. datasets. Can you consider an option to switch between generated and original filenames? |
Hi @pkel, I'v just taken a look at this again. The actual problem is only in OJS 2.4.x, right? -- In OJS 3.x the original file name is part of the suggested default file name and the file name can be renamed/edited. Thus, that problem seems to be solved in 3.x, right?
The problem with .tar.gz still exist in OJS 2.4.8-2 and we will try to consider that... |
My post definitly was about ojs3. We delayed migration, that's why I'm not in the topic any more. I can reconstruct the followong from above:
|
As proposed in pkp#2003. This is a fix I applied on Nov 28 to my OJS3 installation. I am not sure whether this was fixed somewhere else.
#2003 consider TAR GZ as extension for the server file name
@asmecher, we have to do here (in OJS 3.x) with several things:
Would it maybe make sense to provide the user entered localized file name also for download? |
#2003 consider TAR GZ as extension for the server file name
Download file name to client file name and preservation of the upper and lower cases in the extension PR: |
Thanks, @bozana -- this looks OK to me, though I haven't tested it. The server-side filenames are generated using |
#2003 download file names and their extensions
@pkel, the first two issues are solved and merged. We will not provide a setting for the file names (at least not for now), so may I close this issue? |
Thanks. |
This article was inserted in the system by using the native XML import on this file.
If you try to download the the R Source Package or the R example code, you will see that the file extensions are not preserved.
.tar.gz
is replaced by.gz
and.R
by.r
.Perhaps this is related to #1924, where the same extensions cause problems on migration.
The text was updated successfully, but these errors were encountered: