How Download Some Picture into Client Computer NOT in Server Machine?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

How Download Some Picture into Client Computer NOT in Server Machine?

Post by cishpix »

Hi all,
I have search in this forum about how download some picture and how show the check box for multi select (for picture) but unfortunately not founded.
For easier sample, I take PhotoAlbum from Aware IM sample
picture_questions.png
picture_questions.png (209.92 KiB) Viewed 1756 times
My questions
  1. How to set the checkbox for every picture can selected when we click the picture?
  2. How download some or all picture directly into our computer NOT in Aware IM machine?
I have use EXPORT DOCUMENT Photo.DisplayPhoto TO FOLDER 'c:/' process but unfortunately the pictures only download into server machine, not into client computer
Regards,

Suwandy
-----------------
Kisaran - Indonesia
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: How Download Some Picture into Client Computer NOT in Server Machine?

Post by joben »

For question number 2, you can use:
DOWNLOAD DOCUMENT

You can't force a file to end up in a specific folder on the client's computer.
The browser on the client decides what happens to the downloaded file.
Regards, Joakim

Image
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: How Download Some Picture into Client Computer NOT in Server Machine?

Post by cishpix »

joben wrote: Mon Sep 19, 2022 7:55 am DOWNLOAD DOCUMENT
Hi Joben, thanks for your response. I have test it but only the first image downloaded, not other picture that was selected together.
Just FYI, I use custom query so there is not any checkbox available in the query like standard query. That's why my 1st question ask about "How to set the checkbox for every picture can selected when we click the picture?"
joben wrote: Mon Sep 19, 2022 7:55 am You can't force a file to end up in a specific folder on the client's computer.
The browser on the client decides what happens to the downloaded file.
Message noted with thanks
Regards,

Suwandy
-----------------
Kisaran - Indonesia
joben
Posts: 221
Joined: Wed Nov 06, 2019 9:49 pm
Location: Sweden
Contact:

Re: How Download Some Picture into Client Computer NOT in Server Machine?

Post by joben »

Not sure if this can be solved without custom code. Simply combining "DOWNLOAD DOCUMENT" with "applicable to multiple items" doesn't work for me. It only downloads one of the marked items.

I unfortunately don't have much time to make a proof of concept, but you could try this:

Try creating a process which copies the marked files to a certain folder on the server, like "C:\test\", I think you already used the correct command in your example (EXPORT DOCUMENT)

The next step would be to put the images in a zip file and then delete the images from C:\test\. It would probably require the EXECUTE PROGRAM function combined with a CLI command for zipping (like 7zip).

Then you can use IMPORT DOCUMENT to a non-persistant BO and place your zip file there, delete the zip file from the server folder, and then call DOWNLOAD DOCUMENT to download it.
Regards, Joakim

Image
rocketman
Posts: 1239
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: How Download Some Picture into Client Computer NOT in Server Machine?

Post by rocketman »

Never tried this but have you tried “PICK ONE OR MORE FROM” in your process, then create a second process with the DOWNLOAD DOCUMENT command which uses the BO containing the images for the process input.

It works differently to “Applicable to multiple items”
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: How Download Some Picture into Client Computer NOT in Server Machine?

Post by cishpix »

rocketman wrote: Mon Oct 10, 2022 3:32 pm Never tried this but have you tried “PICK ONE OR MORE FROM” in your process, then create a second process with the DOWNLOAD DOCUMENT command which uses the BO containing the images for the process input.

It works differently to “Applicable to multiple items”
Hi Rocketman, thank you for your suggestion. I have tried "PICK ONE OR MORE FROM" feature but it doesn't work with "DOWNLOAD DOCUMENT" because only first image was marked downloaded (as Joben tried too)
joben wrote: Mon Sep 19, 2022 2:11 pm Try creating a process which copies the marked files to a certain folder on the server, like "C:\test\", I think you already used the correct command in your example (EXPORT DOCUMENT)

The next step would be to put the images in a zip file and then delete the images from C:\test\. It would probably require the EXECUTE PROGRAM function combined with a CLI command for zipping (like 7zip).

Then you can use IMPORT DOCUMENT to a non-persistant BO and place your zip file there, delete the zip file from the server folder, and then call DOWNLOAD DOCUMENT to download it.
Your idea are works, thank you Joben and more appreciate for your help.
I just think is it possible if the zip filename as timestamp like 20221013_135716.zip?
Regards,

Suwandy
-----------------
Kisaran - Indonesia
Post Reply