on 12-03-2013 4:01 AM
Hi experts,
Is there any possibility to upload images from front end to backend (non-sap(mssql)).I have tried with different possibilities,but either the path or binary format has been stored but not the actual image.When i have taken the image field datatype as "Image" in frontend and backend, then binary format like"<Binary data>" is stored in the image field in backend. When the frontend and backend datatype is "string", then path of the image has been stored. In both the cases "edit type" at screen level is "image capture" .
Thanks in advance.
Regards,
Sravanthi Polu
Yes it is possible to upload images from the front end client to the backend. The actual steps to store it will be dependent on what backend you are using. The data will come from the clinet as a binary string or base 64 encoded string.
You didn't mention what kind of update step you are using to store the image (Java or SQL). Either way your update step will need to properly format what is received from the client to store it in the format/method desired by the backend system.
Oftentimes, the actual image is stored on the filesystem and a reference to it is stored in the database rather than storing the actual image in the database table.
--Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bill,
Thanks for your reply. Iam using sql step to update to backend(mssql).Different datatypes that i have tried for image fields and their logs that i have found in "backendsql" file are as follows
Frontend Back-end (mssql) SqlLog MSSql Image
String nvarchar(max) C:\Users\Pictures\Sample Pictures\Dock.jpg Storingpath
(Updating Path)
Embedded Image Cannot evaluate flunky - << BinaryData>>
image must supply another parameter
Embedded nvarchar(max) Cannot evaluate flunky - Cannot evaluate flunky -
Image must supply another parameter must supply another parameter
String Image C:\Users\Pictures\Sample Pictures\Dock.jpg <<BinaryData>>
(Updating Path)
In all these cases at screen level i have used "edit type" for image field as image capture.I want to upload images from mobile to backend and also download images from backend to mobile device.
Is there any configurations to be done at server level.
Regards,
Sravanthi Polu
Sravanthi,
You must use the "data" attribute of your image capture property to access the binary image data in your SQL Step. If your image capture transaction property is called "Picture", you need to access the image flunky data this way:
"<<transaction.Picture.data>>"
You will need to expirement with Base64 encoding and decoding of this string depending on how/where to plan to store the data.
Jason Latko - Senior Product Developer at SAP
Jason,
Thanks for your reply.I have uploaded images to agentry server as mentioned in the link
Agentry - Tutorials - SAP Mobility - SCN Wiki.
I have written a function to generate the "Image ID" automatically in backend mssql,transaction update steps(to capture the real "Image ID",file system update step(to update images to agentry server folder).Now the images are storing in agentry server with unique ID.But when i upload image to sql server it is storing only the path but not the image.
Regards,
Sravanthi Polu
Sravanthi,
Whether you are using an external data property or an embedded image property in your transaction, you still need to reference the flunky's "data" attribute to retrieve the bytes in your sql script:
"<<transaction.Picture.data>>" for example, if your transaction's Embedded Image is named "Picture", or "<<transaction.Document.data>>", if your transaction's External Data is named "Document".
Jason Latko - Senior Product Developer at SAP
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.