EAP version 1.34.0-dev

Forum to discuss everything related to the current development build of Automagic.

Moderator: Martin

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.34.0-dev

Post by Martin » 10 Aug 2017 13:58

You are right, the filename that is transmitted in the Content-Disposition line in the request is automatically set to to filename of the local file. When you select a Field Name of xyz, the trigger HTTP Request will get the filename in variable param_xyz. The trigger will also store the contents of the file in a temporary file and then provides the path to this temporary file in variable file_xyz.
That the trigger stores the parameters, headers and files directly in variables has historical reasons, maps did not exist at the time the trigger was added. I should probably also provide the values in three maps since the keys of the map also allow characters like . and other characters that are not valid in a variable name.

I will rename Field Name to Form Field Name and set the default to field_name or something similar to avoid confusion.

I would highly appreciate it if you could create a tutorial and/or example flow for the HTTP features. If you like, you can post it in the General forum with a tag [Tutorial] and I can make the post sticky.

BTW: Thanks for testing!

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: EAP version 1.34.0-dev

Post by Desmanto » 10 Aug 2017 17:12

For param_xyz and file_xyz, those can stay like this. But if it is possible, i would like the automagic webserver automatically rename the file uploaded to be the real filename (so no more random number file name). Of coz, it is just one action away, but it will be cleaner from the webserver side. Form Field Name is Ok, will see it in the next update.

I wanna create the tutorial. But until now, I still stuck with eventghost webserver. I have to detour to learn python again, since EG use python to process the scripting. From 5 main features i need, only uploading file to EG left to be solved. EG won't accept the file just like automagic webserver. Wish I have learn it properly several months ago, when I was still using tasker. But when typing this, i realize I can take a peek at autoremote's EG plugin python source, to check how it handle the file transfer. But will take some time, it is 2000 lines of python code.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.34.0-dev

Post by Martin » 12 Aug 2017 08:31

Automatically using the real filename is risky since one uploaded file could overwrite another uploaded file or when two uploads happen at the same time the files could get corrupted. I think it's better to keep the temporary file name for now. You would probably still have an action to move the file to the desired destination directory so something like this should work: action Move Files: {file_xyz} to /storage/emulated/0/MyUploadedFiles/{param_xyz}.

Regards,
Martin

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.34.0-dev

Post by Martin » 13 Aug 2017 13:32

A new EAP version is available. Version 1.34 is considered feature complete so I will only test and fix bugs in the next few days/weeks.

Changes in this update:
  • minor changes and fixes
Download: Automagic.apk (2017-08-13)

Regards,
Martin

Bender64
Posts: 20
Joined: 25 Feb 2016 15:47

Re: EAP version 1.34.0-dev

Post by Bender64 » 18 Aug 2017 19:13

Super update ;) great job Martin.

User avatar
schuster666
Posts: 52
Joined: 13 Nov 2013 14:03
Location: Germany / Neuss

Re: EAP version 1.34.0-dev

Post by schuster666 » 21 Aug 2017 15:49

Hallo Martin,
ich glaube die interne Variablenverarbeitung klemmt.
Wenn ich versuche 2 mit getDate() ermitttelte Zeiten zu subtrahieren hängt es mir nur die Millisekunden wie bei concat an.
Bei division bricht der Flow mit Fehlermeldung ab. (can not apply operation).
Das löschen der Variablen ignoriert AM auch völlig.
-- the world would be better without people--
-- but boring --

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.34.0-dev

Post by Martin » 21 Aug 2017 19:16

Hi Schuster

In meinen Test funktionieren bisher alle Operationen noch. Kannst du ein Beispiel Script zeigen oder einen Flow hier teilen oder mir per Mail senden, welcher das Problem reproduziert?
Am besten wäre ein Script, welches alle drei Probleme aufzeigt (Beispiel mit Subtraktion von 2 Mal getDate, Beispiel mit Division und ein Beispiel mit Löschen).

Vielen Dank & Freundliche Grüsse
Martin

User avatar
schuster666
Posts: 52
Joined: 13 Nov 2013 14:03
Location: Germany / Neuss

Re: EAP version 1.34.0-dev

Post by schuster666 » 22 Aug 2017 10:35

Hallo Martin,
kommando zurück.
Habe aufgrund anderer auffälligkeiten das Gerät komplett neu Aufgesetzt. Es lag wohl am System. Sorry, das war bisher nie ein Problem da alles Original. Das Verhalten von AM ist nun wieder absolut normal.

Sorry nochmal.
-- the world would be better without people--
-- but boring --

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.34.0-dev

Post by Martin » 23 Aug 2017 20:14

Kein Problem! Bin froh, dass es kein Fehler in Automagic ist :-)

Freundliche Grüsse
Martin

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.34.0-dev

Post by Martin » 26 Aug 2017 19:51

A new EAP version is available. Version 1.34 is considered feature complete so I will only test and fix bugs in the next few days/weeks.

Changes in this update:
  • added new extended script function findAll to get all groups of all matches of a regular expression
  • minor changes and fixes
Download: Automagic.apk (2017-08-26)

Regards,
Martin

Locked