Import Document from URL

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Import Document from URL

Post by hpl123 »

I didn't think about other ways to do this, good idea. Here is also another way using cURL and PHP: https://www.kodingmadesimple.com/2018/0 ... l.html?m=1

Another pure PHP and seems quite easy to use: https://www.google.com/amp/s/www.geeksf ... g-php/amp/
Henrik (V8 Developer Ed. - Windows)
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Import Document from URL

Post by ACDC »

I didn't think about other ways to do this, good idea. Here is also another way using cURL and PHP:
The javascript example makes sense, but using a PHP method from inside AwareIm doesn't make sense ? Are you running PHP with AwareIM on the same server ?
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Import Document from URL

Post by hpl123 »

ACDC wrote: Tue Apr 25, 2023 12:59 am
I didn't think about other ways to do this, good idea. Here is also another way using cURL and PHP:
The javascript example makes sense, but using a PHP method from inside AwareIm doesn't make sense ? Are you running PHP with AwareIM on the same server ?
Sure it makes sense, PHP is a server/backend language that can be used for a lot of different stuff and I use it for many things on my Aware server. The way I see it in relation to Aware, Aware does the RAD type development BUT if you want more than that i.e customizations you would need to use other development "options". Outside of Aware, I typically use JS and jQuery for the frontend stuff and PHP and Java for the backend. Java is a considerably degree more complex and cumbersome so PHP is a good middleground.
Henrik (V8 Developer Ed. - Windows)
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Import Document from URL

Post by ACDC »

Java is a considerably degree more complex and cumbersome so PHP is a good middleground.
Interesting, would Python not be a better option for this purpose?
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Import Document from URL

Post by hpl123 »

ACDC wrote: Tue Apr 25, 2023 4:19 pm
Java is a considerably degree more complex and cumbersome so PHP is a good middleground.
Interesting, would Python not be a better option for this purpose?
I don´t know Python but is a backend language (primarily) as well I see when reading about it so can probably do most of what other backend languages can i.e it´s just down to preference. PHP is easy and I have used it for a long time for minor things here and there and works well.
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Import Document from URL

Post by hpl123 »

I actually thought of another potential solution (I am bored, can you tell lol). I THINK I recall reading something (forum or some other place) that its possible to get a file via a REST API call that Aware converts into a file (via BASE64?). If that's possible, it is probably also possible to find some online API that downloads a file from a URL and turns it into a BASE64 string and then sends it to another REST API (i.e an Aware one and Aware receives it and then converts it into a file). Shouldn´t this be possible?

I found this as the first result when I googled it and could work (and if not, I am sure there are others): https://www.api2convert.com/
Henrik (V8 Developer Ed. - Windows)
Post Reply