you can use a webservice, or a remote service thus are just some of the possibilites.
1 person found this helpful
You might use blazeds for that. or you can use filereference. If it is an image, you can convert it into base64 and send it to the server and decode it.
A closer look at architecture follows:
user web browser <-- FB4 web app <-- SOAP/WSDL <-- DB file server
From their web browser, the user launches our hosted web app. Then the user selects a file to view. The web app fetches the Base64 encoded file from the DB (which cannot expose the file URL), decodes it, strips the SOAP/WSDL wrapper, checks the file type and points to the ByteArray with a String. If the file is *.png *.jpg or *.gif, then the web app displays the image.
If the file is *.PDF (90% are PDFs) then the web app must:
1) write the file to its own disk as a PDF or SWF and send that file URL to a web hosted iFrame to display (for example, FlashPaper).
2) convert the file JPG, PNG and display the resulting (possibly multi-page) image
As I understand, fileReference prompts the user to save to their PC. But, we do not write sensitive files to the user's PC.
Can a hosted web app write to its own disk?
Otherwise I need to write from the web app to a web server (such as blazeds) in a session IIS cluster, then find and use the file URL.
Is it that complicated to show a PDF from a web app?
So, you want to open an image/file and save the modifications back into the server? If you open a file from the server, and want to save it back, then it is kinda not possible for pdf, you might end up opening pdf in a separate window where flex is not used(Only java script). For images, you can show it on the UI and any modification you do, is actually done on the image in flex, so, you can save the bytearray back intto the server.
Thanks, you are close to the issue. Adobe web programs cannot display a PDF (except possibly for FlashPaper). You can show a PDF in an iFrame, but you need the file URL.
In a file-server architecture, backend DB and front-end session manager (such as Apache, IIS clusters), the Flash web app gets the file via SOAP/WSDL from the DB and cannot receive the URL due to medical security. Therefore, the web app needs to save the ByteArray (containing a PDF string of bytes) to a local file. The web app can then send the URL to a hosted iFrame.
Problem becomes, how can a web app write a local file (on the Apache or IIS cserver)?
Otherwise, we need to convert each PDF to a JPG or PNG in memory.
We appreciate your help. If we solve this, then we will make the process publically available.