How can I show a link to download a file on wicket? - file

I've looked at some wicket tutorials, gone through similar questions but couldn't get my answer. Can you give me a simple example of how to put a link on a page, and the user can download a file when the link is clicked?
I'll retrieve the file from a database table (blob column). The thing is, I'll need to put the link out there on the page (with the file name on it) without going to the database yet. When it's clicked then I'll retrieve the file and the user can download it.
Thanks in advance.

I think that the best solution is to extends Wicket DownloadLink.There are multiple questions on StackOverflow regarding this issue ...example
But i really dont think it is posible to create the download link without querying the database for the file name. Of course you will only encounter this problem if you need the file name in the link...or something like that..You could always create a link with a static name ex : "Download file" without the file name and the you would not need to query the database.

Related

Multiple Similar (Duplicate) Reports

I currently created a report that I would like to duplicate 40 times but with a different filter each time. So far I'm afraid this is only possible with a very manual process but I was hoping if someone has a faster solution?
Would it be possible to connect to the DataStudio API (if there is one) and run a script for this?
Also, making a design change can be problematic as it needs to be copied to 40 reports. Does anyone have a suggestion for this?
A report is stored as an RDL file in the file system. Its of XML format. Make a copy of the file in the file system and open the copy using a text editor (I prefer notepad++) and find the parameter. Change the paramater to whatever value you want it to be and save the file under a different name. I would include the parameter name in the report name. If the report as using 'Memphis' I would name the report Sales_Memphis.RDL.
Do this 40 times. Be very careful about not changing the structure of the XML file (Don't change any of the element names or opening and closing symbols(<>). Re-import the file into SSDT report project to verify it is using the correct value.
To import a file into an existing project:
Right click on “Reports” folder and select “Add” then “Existing Item”
Now file browser window will open.
Find the file and double click on it.
Ideally you can have a dropdown with all the possible values for users to choose from but I guess that is not appropriate for your needs.
If this is a good solution please check it off as valid solution.
I checked this with google support and apparently there is no way yet to do this.
There are currently no API's available to do this nor can you download something similar to an RDL file. Right now the only way is manual duplication and to make adjustments for each report separately.
Have you looked into custom bookmarking. It sounds like it might be able to address the problem you're expressing. This way you would only have one report, but the links you would share would automatically apply the correct filter value.

How to get the directory tree from the client

I'm trying to make a website where a user can choose a directory from his/her pc. Then i want to get a full directory tree from that point. So that i can process the filenames. It's not necessary to upload anything. Just the filenames are enough.
The closest thing i have seen is the upload procedure on http://www.connect.garmin.com.
When you plug in your gps and click on upload. The site gives you a full list of files that can be uploaded from your gps and whether or not you have already uploaded it.
How can this be done? PHP, javascript or a plugin in python?
it looks like there are a few people that had the same question that you did, here is a Link to a blog that I found on another Question on SO
HTML5 Upload Blog
here is the SO Question I found it on
Html 5 File upload
there is a lot of information on that blog that is very useful and I think that you will find everything that you are asking there.
Most of the File Browsing is done by the clients Web Browser so you won't have to worry about coding the actual pop up window. you just have to give the browser the type of files that you are looking for.

How can I predict links in box.net?

I'm a new user on box.net site and I've uploaded A LOT of .zip files that I want to use in my project.
The problem is that, normally, the share link is something like: box.net/1.zip .. so I can predict that the 100th file will be box.net/100.zip ... but this is not the case in box.net..
I cant obviously copy every files link manually since what I uploaded and need is ~1000 small .zip files and copying each files link will take ages.
So is there a way to fix this?
We recently released a new feature, where you can give your share a custom name. See the blog entry for more details on how to use it.
Right now, we have not exposed an API to set these custom links, but that will be coming soon.

File doesn't show up in TYPO3 Fileadmin

is TYPO3 doing some indexing of the filesystem into database?
We try to add a video to our page here, but video isn't selecable from the file window altough its put into the right directory.
The Fileadmin says "9 records found" in the folder and is displaying only 7 Files, because someone might have deleted two of the files out of the folder.
But the new video file we've put there won't be displayed, too.
Is there any way to manually start TYPO3s file indexer?
I don't think TYPO3 does any indexing of the files; it just reads the list of the files straight off the filesystem. So there's no file indexer to start.
My suggestion for your problem would be to check the permissions on the file you uploaded and make sure it's readable by whatever user the Web server is running as ('apache', 'www-data', etc). If it isn't readable by the Web server it won't show up in the fileadmin area.
Okay guys, I feel stupid right now - altough I can't really explain the behavior...
What happened seemes to be some strange caching failure.
If you click on the "choose file" button it shows the window as seen in the screenshot above, displaying the last used folder.
But: this view is somehow cached.
If you select the same folder again from the file tree from the left, the view is updated and the missing files are shown -.-

Sharepoint document library as a destination in SSIS

I create a CSV-file from SSIS and I want to "publish it" in a specific folder in our Sharepoint document library. What is the preferred way to this?
I have looked at the example with the sharepoint list destination SharePoint List Source and Destination which is quite good but not exactly what I'm out for. I just want to upload a file to the document library from within SSIS.
SharePoint uses WEBDAV to provide a folder like locations. You can see an example of this by going to the list in question and selecting actions-> open with explorer.
Another alternative is to send an email to the doc library.
The doc lib owner needs to set up the email address on the page options, this will give you an email that looks like
xxxx#moss.domain.com
If the folder ever gets moved around, as long as the email remains, you don't need to worry about it

Resources