You need to sign in to do that
Don't have an account?
VarunC
External Web Service download a file problem
I'm trying to integrate an external Web Service API into force.com. In that webservice I can get COntent of a File, my issue is how can I create a Visualforce page and APEX class such that I can get my force.com users to download the File. The file can be txt file, pdf file, excel file or anything. :( .... help ...
Hi,
I am not an expert in webServices, but as per my understanding you are getting the contents of file from the web service.
Your porblem is how to show them to the users so that they can download the file?
If my understanding is correct, then you can have a Visual Force page on which there will be a "Get Content" button, on click of this button your web service will be called, which will return the contents of the file.
Once you get the contents of the file, you can create an attachment from the contents of the file. You can use any dummy object and attach that attachment to that object.
on the same Visual Force page(below your "Get Content" button) you can show a page block in which you can show the attachments, from where user can download the attachments.
Please correct me If I am missing something!!!!
Thanks,
Mandar
Thanks for the reply .. this introduces unnecesary extra steps, and is not an idle solution :( ... this would require user to first get file from web service and then click again to download file .... can you suggest any client side javascript solution you know of ... which will download the file and show user file save dialog on link click?
Finally could you solve your problem?? I'm facing exactly the same right now and I can't find any solution.
Any help is appreciated.
Best Regards,
Daniela.