Is there a method to limit the xpages file unload control to allow only one file to be uploaded.
Thanks
Bob
Set rendered property so it only shows if the document does not have an attachment. You just need to add the facility to remove an already-attached file.
Related
We are using Kentico 10
Question 1
We are using DirectUploadControl to upload image in a page form.
We have column PDFImage in the page type. I can see the value of this field to be a GUID.
Where the image is stored on disk when uploaded by this control? Which table is updated with file name?
I tried the page type table, cms document and media file but couldn't find.
Question 2
We need to process the image when uploaded. Is there an event? Right now we are doing this in DocumentEvents.SaveVersion.After
This depends on how the system is set to store files. So, it can be in the DB or on disk or both. When on disk, it depends what folder is set to store the attachments.
In the document events there is the SaveAttachment event - so maybe you can try using that one. Or, it might be better to create a custom uploader form control - depending on your needs.
I need to expose the pdf version of a NetSuite invoice in my ecommerce site. I'm using saved searches to push up invoice header info but I want to be able to click a link and it will download the NetSuite invoice pdf.
The link to the PDF of an Invoice record looks like this:
/app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&formnumber=102&id=3253&label=Invoice&printtype=transaction&trantype=custinvc
You can use a formula column in your search that dynamically fills in the correct parameters and generates an appropriate <a> tag.
You need to mark the PDF files in the File Cabinet to be "Available Without Login", this should provide you with an External URL you can use to download.
Here is what you can do : taking in consideration that you want the file to be accessible without netsuite login:
To access a file without login, it must be in file cabinet and with "Available without login" checked but when you click on Print in netsuite, this doesn't save the generated file in the file cabinet, so here is what you can do:
Add a custom transaction body field of type free-text or url.
Create a userevent script that trigger on aftersubmit (I'm here giving a general idea, so you can set it otherwise if you want).
Using the "render" (suitescript 2.0) : you can generate the PDF of your Invoice, save the file in the file cabinet with "Available without login" checked.
After saving the file, reload it and get its external url and save it in the custom field created in (1).
Updated your Saved Search to add the new field as a result column
Good luck :)
Good Day!
I am uploading some files in form as attachments and I am trying to filter the uploaded file extensions. But I am not getting the exact solution for this.
Is there any way to filter the extensions of the files being uploaded in file attachments?
Thank you so much for the help.
If you mean blocking file upload based on the extension you can do so in File Upload Preference Screen (SM202550):
If you mean the filter for the native open file dialog. It seems hardcoded for a handful of common web files and I don't think it can be changed easily.
If you mean the file upload dialog grid, unlike most grids in the system it is not filterable through the column headers:
Maybe the Search in Files page (SM202520) is what you're looking for. You can search files based on extension here:
We have an existing application that allows exporting of an Infragistics data grid to either Excel or PDF format. Currently, when the user clicks on the Export button, it asks them where to save the file and then it exports it and saves it. Then, to launch it, they go to where they saved it and then it launches.
The user wants the application to instead launch the grid into either Adobe Acrobat or Excel and THEN that is where the user can opt to save the file. They don't want it to ask where you wish to save it before it exports, like it currently is doing now.
Is this possible with the Infragistics Document Exporter? I couldn't find any information on this from the Infragistics web site.
I'm thinking, instead of giving it a filename, I could instead use a stream maybe to the console or something like that and let the OS give the user the option to launch it?
Is there an example somewhere of this being done? I see there is an overload in the Export member function that allows you to pass in a stream.
Thanks!.
The Infragistics excel engine and documents engine will need to write to a file to be able to have the file opened in Excel or Adobe Acrobat so you will still need to save a file before they can open it.
For the requirement to open the file, you could use System.Diagnostics.Process.Start method and if there is a program associated with the file type you can pass the file that you just saved.
As there is a dependency on the file system to open the file in Excel or Adobe Acrobat you will not be able to achieve your goal of not requiring the file be saved first. While it may be an option to save the file in a temporary location and then open that file it also has an issue that if the user were to click save in excel it would still save in the temporary location so they would need to know to use Save As to save in a different location.
Every time I reload my webpage new files are added to the c:\windows\temp\notes...\xsppers folder on the server. and these files are never deleted, I have to manually delete them, and it can be several GB of data to delete every month
I have a simple xpage with a repeat control that display data from several documents using a computed Field mapped to a rich text field.
the richtext fields contain a lot of inline images that has been added using the notes client.
Now, every time I reload my webpage these images are now detached to the xspper folder and is causing my harddrive to run out of disc space all the time.
What is the reason for this behaviour and how can I avoid it from happening?
In the image below you see all the gifs that has been created with a new uinque name, each time I reload my webpage a new set up images are added to the folder.
I am using Domino 9
As Egor Margineanu wrote, this can happen if your images are not stored as MIME images in your Rich Text item.
This forces the domino server to detach the attachment(s) over and over again to disc, because it is required to generate a GIF form the inline image. If you change the MIME type of your rich text item in your form and save the document(s) again, the images are stored in the "correct" format, and the domino server is able to identify that the images are already on the HDD.
As far I can see the temorarly detached attachments are not wiped when the session ends. This seems to happen if the application ends.
Not a complete answer but some clarification from the XPages Portable Command Guide, page 36:
The files remain in the temporary persistence location until the user
session expires. The file is not removed after the document is saved,
although it is no longer referenced by URLs.
It may be useful to change this
setting to point to a different location if the folder is taking up
too much space on the main server drive and another drive has more
available space. This option is server-wide, so it should be set in
the server xsp.properties file. Values set in a particular
application’s xsp.properties file are ignored.
Based on your question, Thomas, it seems that this is not what you are experiencing.