Renaming downloaded file name from a browser - browser

I remember seeing a special link argument/parameter that sets a name for a downloaded file in Chrome (or any other web-browser).
I have a link to a video (mp4) file and I want it to be downloaded to my computer with a different filename.
https://www.link.net/to/my/file.mp4?forcedownload=1&title=my_renamed_title.mp4
The "title" parameter doesn't work, and I can't find the parameter name which does this renaming action. The "forcedownload" parameter automatically opens up a download dialog, but with the wrong file name.

Related

Is there a way to upload files without a file extension suffix to Flask-Dropzone?

I'm trying to use Flask-Dropzone as part of a web-app to upload files for processing. These files typically don't have a file extension due to a quirk of the export process that generates these files.
I've consulted both the Flask-Dropzone docs and the Dropzone.js docs and both seem to imply that if DROPZONE_ALLOWED_FILE_CUSTOM = False then every upload of all file types should be accepted. However, when navigating the file upload window, the filter defaults to "All Supported Types" and seems to only accept images. I can toggle this to "All Files" but when trying to upload anything else the dropzone gives the default error message about the file not being allowed.
I am able to set custom allowed file types such as .pdf's, .xlsx, etc. However this isn't useful as the files in question doesn't have a declared file type extension.

how to "save" a file/folder in the Node.js app "Universal GUI"

I can't figure out how to add a "save file/folder" input to Universal GUI.
I need to be able to pick a location to pass as a file or folder
to the cli program without the file/folder in question existing already.
Selecting a pre-existing file to pass to the cli command is easy, just use the generic file upload entry.
And Universal GUI already has a "select folder" entry.
Both options require selecting one that already exists.
So all I need is to be able to select a file and/or folder that doesn't exist in a "save" form.
I've never found an alternative to NW.js that doesn't require manually setting up the Node.js launcher.
So that's what I run the app I made in/for Universal GUI.
The folder browser is designed to allow you to select existing folders or create new ones. File select will also allow you to create new files.
It sounds like what you want is to use the folder selector, so the user can select the folder (or create it, then select it) as their output directory. Then give them an input text field to type a file name into. Then you just combine all of that together as an argument for the CLI.
<cmd executable="myexe">
<arg>--save "((outputDirectory))\((fileName)).txt"</arg>
</cmd>
<!--
What would be sent to the command line:
myexe --save "C:\Users\Bob\Desktop\SomeFolder\MyFile.txt"
-->

POI XSSF - Can't add pictures to existing xlsx file

At this line:
wbk.addPicture(iconData, Workbook.PICTURE_TYPE_PNG);
I get this exception:
org.apache.poi.openxml4j.exceptions.PartAlreadyExistsException: A part with the name '/xl/media/image2.png' already exists : Packages shall not contain equivalent part names and package implementers shall neither create nor recognize packages with equivalent part names. [M1.12]
That same line of code has worked perfectly before. If I open the xlsx file with 7zip, there is actually a image named image2.png, which is correct and is another picture added by hand with Excel. It's like it tries to add the new image with the same name as the existing image. What am I doing wrong?
I was editing a file that was saved with LibreOffice 6.1, after opening it in Excel and saving it, it worked.
Also, like #Gagravarr said, a upgrade will be better and will probably work without needing to use Excel only

How to attach pdf embedded in excel in outlook email with vba

I have created an embedded pdf with the insert> object > create from file> browse > display as icon function in excel.
I would like to then use the embedded pdf as an attachment for my outlook email using vba code. I have tried to use the .Attachment.Add code but it seems to fail to detech an embedded object.
Could anyone advise a correct code? Thanks!
Get the file from the source?
I don't understand why you would need to embed the.PDF object in the workbook, if you're going to be emailing it separately anyhow...
Regardless, you could just grab the actual/original .PDF to attach a copy to the email, directly from the same location from where it was embedded. (If it's not there, what happened to it?)
Another option:
As soon as you right-click the embedded object, Excel 2016 "gets ready" for you to open it by extracting it to your local temp folder. (I'm unsure whether this applies to previous versions.)
Therefore, you could programmatically right-click the embedded icon, and then check the temp folder located at the path that you'll find stored in Environ("temp"). One or more copies of your file will be located there (and it should be the 'newest' PDF).
Yet another option:
Excel's XLSM file is simply a compressed ZIP file, if you change the extension. You could programmatically make a copy of the file, changing it's extension to .ZIP.
Embedded object are stored as .BIN files within the ZIP file in the xl\embeddings\ folder. It would have to be extracted and then renamed back to a PDF. Note that this method is a little flakey and won't work with all PDF's.
More Information:
VBA Express : Save embedded PDF file as a separate PDf file
How-to-Geek : How to Extract Images, Text, and Embedded Files from Office Documents

Prevent Opera from adding "(#number)" to file name when I download files with existing name

Whenever I save a file from the Internet, Opera shows the download dialog and, if a file with the same name (as the file's default name) already exists in the default download location, it will automatically append a "(NUMBER)" (e.g (1), (2).. ) to the file name (it doesn't save it, but replaces the default name it shows with the appended one). Is there no way that I can prevent this from happening?

Resources