upload the images in a batch
Is there a way to upload a large number of image files in a batch?
Create a Binary rule (Technical --> New--> Binary) requires to manually create and upload image one by one.
There are a large number of image of products and need to be stored in PRPC. Does PRPC has some other way to get them uploaded in a batch?
***Updated by moderator: Lochan to update Categories***
Hi Dyan,
I have never implemented this, but found an interesting article similar to your use-case.
May be it helps, https://collaborate.pega.com/discussion/how-upload-all-images-folder
Content from the link:-
Go to Operator ID rule (open your own), use UI Inspector to see what control is used to upload images. Read a help article about working with images. Pega has a number of activities which work with a server file system, e.g. search uploadFile or downloadFile.
Take a look into Connect-File method in help.
Also, this mesh post discussion contains detail mechanics of uploading image :- https://mesh.pega.com/docs/DOC-107771
I am putting content here, as some time mesh documents aren't accessible.
Findings by observing current implementation of Operator image upload feature:
1. Mechanics for uploading an image file to PRPC application server's file system.
Hi Dyan,
I have never implemented this, but found an interesting article similar to your use-case.
May be it helps, https://collaborate.pega.com/discussion/how-upload-all-images-folder
Content from the link:-
Go to Operator ID rule (open your own), use UI Inspector to see what control is used to upload images. Read a help article about working with images. Pega has a number of activities which work with a server file system, e.g. search uploadFile or downloadFile.
Take a look into Connect-File method in help.
Also, this mesh post discussion contains detail mechanics of uploading image :- https://mesh.pega.com/docs/DOC-107771
I am putting content here, as some time mesh documents aren't accessible.
Findings by observing current implementation of Operator image upload feature:
1. Mechanics for uploading an image file to PRPC application server's file system.
- OOTB control "FilePath" and section "pzUploadFileWithBrowseOption" do the trick.
- The file will be uploaded to "{pega_tmp}\StaticContent\global\ServiceExport" directory.
- The property pxRequestor.pyFileUpload holds the Full path of the uploaded file.
2. Mechanics for saving uploaded image file into PRPC database.
- OOTB function "@Utilities.uploadFile(boolean )" reads uploaded file from file system into Memory. The contents of uploaded file are converted to base64 encrypted text.
- OOTB class Data-Content-Image can be used to save base64 encrypted text to the database. ".pyFileName" and ".pyFileType" are used to hold file name and file extension respectively.
3. Mechanics for retrieve and cache image file from PRPC database to PRPC application server's file system.
- OOTB class Data-Content-Image has a property ".pyFilePath" which holds the relative directory path with reference to the direcotry "{pega_tmp}\StaticContent\dataContent\Image".
- OOTB JSP tag <pega:ContentURL> will retrieve record of Data-Content-Image from database then restore and cache the file under the directory "{pega_tmp}\StaticContent\dataContent\Image\{.pyFilePath}"
4. Mechanics for display image file on the screen.
- Custom control is needed to display cached image under the directory "{pega_tmp}\StaticContent\dataContent\Image\{.pyFilePath}"
This information may help you in giving heads up in implementation. You can write an activity to upload the images using above information.
Kindly notify, if it helps.
Regards,
Asif