No more scanning / corona sdk integration with pictures

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

No more scanning / corona sdk integration with pictures

Post by D Oliveira » 2018-05-23 20:33

Greetings, here in our contractor office in Florida we lose a lot of time scanning files that are going to be uploaded to an appgini application, printers can be annoying and take forever to work, in order to solve this issue, I plan to develop an app in the languague .lua using a simple sdk called corona sdk. They provide a PHP sample script to upload the files to a specific directory ( https://coronalabs.com/blog/2014/02/25/ ... mystified/ ). Although Im familiar with the .lua language and a bit of PHP I found it difficult to adapt the script to work with my bluehost server, it is not production ready. The Plan is to take pictures inside the app and specify the id and the field so that the pictures are sent directly to the correct directory and available for viewing if you go to the detail view of that specific record and click on the file upload field. Any one up to the task? Id really appreciate some help or even put some money in depending on your proposal. Lets keep getting appgini even more interesting. Quick note: corona sdk applications are cross-platform (ios,android,whatever windows OS, many others...)

Best Regards
David

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: No more scanning / corona sdk integration with pictures

Post by a.gneady » 2018-05-27 11:16

Hi David,

To make sure I understand correctly, file uploading would be handled by a 3rd party script and what you wish to do is update the related records in the database of your AppGini app to the correct uploaded file name, right?
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: No more scanning / corona sdk integration with pictures

Post by D Oliveira » 2018-05-27 17:23

correct, how does appgini name files?

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: No more scanning / corona sdk integration with pictures

Post by a.gneady » 2018-05-28 12:11

AppGini assigns a random file name based on current microtime. But you don't need to stick to this format. You can choose any other file naming scheme. All you need to do in order for AppGini to 'see' the file is store the uploaded file to the 'images' folder, and store the file name into the upload field.

If you wish to store the uploaded files into a different folder, just change the path in this line in defaultLang.php:

Code: Select all

$Translation['ImageFolder'] = './images/';
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: No more scanning / corona sdk integration with pictures

Post by D Oliveira » 2018-05-29 19:55

a.gneady wrote:
2018-05-28 12:11
AppGini assigns a random file name based on current microtime. But you don't need to stick to this format. You can choose any other file naming scheme. All you need to do in order for AppGini to 'see' the file is store the uploaded file to the 'images' folder, and store the file name into the upload field.

If you wish to store the uploaded files into a different folder, just change the path in this line in defaultLang.php:

Code: Select all

$Translation['ImageFolder'] = './images/';
brilliant, I will share soon an .apk for android users, thanks!

User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

Re: No more scanning / corona sdk integration with pictures

Post by D Oliveira » 2018-05-30 18:27

While setting up the FTP connection it came to me that I could use an app that already exists to perform the function I described ( replacing scanning ). The app is called Genius Scan and costs $8. It crops the paper automatically and exports the file with a smart name to my bluehost server, and then I name my upload fields with the primary key which is the ID and concatenate with the string 'scan' that way my file comes from my iphone and goes straight to the specified record. Using an HP 6975 printer it took me around 2-3 minutes to upload a file, with my phone its literally seconds. Before setting the FTP connection I used to use google drive which works really well too but u do have to upload the files manually, using FTP it works like magic. Thank you for this exciting discussion that made my life easier.

*quick note: for those interested in using this, just use the hook .js to fill the upload field name matching the id+string when you create the record.

Post Reply