You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The filename passed to an upload is unreliable and may even be missing in some invocation styles. Anyway, even assuming it were used, how would the receiving pipeline know which file to use from the stash? In general it would need to run a sh command with a wildcard (*) or similar.
I suppose an extra *_FILENAME environment variable could be defined with the original filename, when available, for use by scripts which were interested in this information. You would need to be rather defensive, though, as blindly referring to such a variable from your script could open your project to Shellshock-like attacks (depending on the state of the art in defenses against this sort of thing in Jenkins core).
A possiblity to get the original file name would be great. I'm using jenkins for automated testing, where the user uploads a binary firmware file. After the test, the file will be archived and the file name is also part of test logs. All firmware-files contain version and build infos in their file name. So without having the original file name, important information will be lost.
Description:
Is there a possibility to retain the filename after unstashing?
According to the Javadoc, the original file name is available in FileItem:
https://commons.apache.org/proper/commons-fileupload/apidocs/org/apache/commons/fileupload/FileItem.html#getName--
Current behaviour:
The name of the unstashed file is the name of the stashedFile parameter
Expected behaviour:
Have access to the original file name (either through actual filename or another mechanism).
The text was updated successfully, but these errors were encountered: