with "file upload" HTML like this:
<input name="input_name" type="file" size="40" />
...there is no way for users to directly enter text into input area for security reasons, correct? file selection window pops up instead.
In Watin automation project, we are wanting to bypass the file selection window and place filename directly in text entry area - but we are not finding a way to do this.
How can this be accomplished? ...or perhaps it cannot be done due to the security constraints?
EDIT-- Not very promising according to this:
Programmatically set name of file to upload in webpage
Anyone have something to add?
did you try to do that with javascript ? I mean with jQuery:
browser.Eval("$('input[name=\"input_name\"]').val('input_path')")
It is just an idea, I can't try on the computer I am.
Related
I am trying to do something like this
leafletoverimage.
Currently I am using background image and angular-leaflets tool for the click and comment.
I am trying to find out a way where I can have pdf file actually rendering on browsers, and able to click on different section of pdf file, have popover and enter comment about that section.
This is similar to what https://app.fieldlens.com/ and www.plangrid.com is doing.
is there something available in angularjs or any other solution is appreciated.
I am wondering if there is a way to have a file input field start up with a file pre-loaded in to it.
For example I have a test file on my server - 'test.txt'
When the user opens the page, I want to have test.txt already loaded in to the input field so all they have to do is fill out the text fields and hit submit
Imagine it was possible. Then you could hide the input field using css and steal any file you wanted ;-)
Apparently a large security risk and browsers prevent against performing such a task.
does anybody know how to disable print/save pdf file? i'm making an application that enable user to view pdf file in an iframe. but i've just been ordered to make it to be as 'viewable but not printable'. now, what i can do is removing the toolbar button, but user still can right click and choose the print option. i had also disabling right click, but id doesn't work in iframe.
Please help.
When you create the PDF,
set an admin password
set an EMPTY user password
set printing document permission to false
If you do not create the PDFs or cannot edit them, then you cannot make the document view-only.
You can use the CFPDF tag to set print permissions. Create copies of all your document and batch process them (or cache them as needed).
<cfpdf action="protect" newOwnerPassword="IHaveCoolPasswords" source="cooldocument.pdf"
destination="protected_cooldocument.pdf" overwrite="yes" permissions="AllowScreenReaders">
I'm trying to specify the licence for my wix setup project.
I have created a rtf with a few dummy lines in wordpad/notepad/vs tried a few different ways as I read there was an issue with ones created in word but I dont think that should apply here, in any case I also opened it up in notepad++ and verified there is no funky characters hidden in it.
I am specifying the file like so
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\Resources\test.rtf" />
And the file exists under the project\Resources directory.
When I run the installer all that is shown in the licence area is a blank text box with no scroll bars etc.
Is there something else I should be doing?
Save the license.rtf from WordPad. See this webpage (http://wixtoolset.org/documentation/manual/v3/wixui/wixui_customizations.html), specifically this section:
There is a known issue with the rich
text control used to display the text
of the license file that can cause the
text to appear blank until the user
scrolls down in the control. This is
typically caused by complex RTF
content (such as the RTF generated
when saving an RTF file in Microsoft
Word). If you run into this behavior
in your setup UI, one of the following
workarounds will fix it in most cases:
Open your RTF file in WordPad and save
it from there in order to remove the
complex RTF content from the file.
After saving it, rebuild your MSI. Use
a dialog set other than the
WixUI_Minimal set. This problem
typically only occurs when the license
agreement screen is the first one
displayed during setup, which only
happens with the WixUI_Minimal dialog
set.
Thanks to #Daniel Powell's decision
Open WordPad
Write your text
Save by default(rtf)
Rebuild your msi
Profit.
Open trf file in wordpad instead of md-word, It will solve the scroll issue
<WixVariable Id="WixUILicenseRtf" Value="test.rtf" />
and include your test.rtf in the Setup project.
My application is in JSP/Struts and running on WebSphere. I don't have access to the server /really/ so I'm trying to do all this from within the app itself (Struts actions & config, JSP, etc).
I have a page that displays links for PDF documents that the user might want to look at. When they click on the link, it is forwarded to the 'document view' STRUTS action which performs the work to retrieve the PDF from the back-end system and then displays the PDF in the browser window. This all works fine.
The users have asked to have the file name of the document be customized for each document when they go to File->Save As... but right now the browser wants to try to name the document after the name of my Struts action. Example: "documentView.pdf"
I have the filename I want to use forwarded to the STRUTS action and I tried using the "Content-Disposition" header to set this, but haven't been able to get it to work. Actually it works great if I use "attachment; filename="myfilename" " but then it FORCES the "Save As..." dialog straight away, which I don't want either.
I want to be able to look at the PDF inline in the browser window and save it with a custom filename if I so choose.
I have read that this might be possible to do with URL rewriting but I'm having trouble sorting out how this technique might work.
Any ideas will be greatly appreciated.
Change the "attachment" part of the Content-Disposition to "inline".
Browser support for Content-Disposition is flaky.
Before it was supported, you used to be able to get the browser to do the right thing by putting a superfluous key/value at the end of the URL. Like:
http://example.com/getPDF?id=123213&filename=mydoc.pdf
Some browsers picked up the last bit of the URL as the filename. Not sure if that still works.