EAP version 1.34.0-dev
Moderator: Martin
Re: EAP version 1.34.0-dev
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!
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!
Re: EAP version 1.34.0-dev
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.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: EAP version 1.34.0-dev
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
Regards,
Martin
Re: EAP version 1.34.0-dev
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:
Regards,
Martin
Changes in this update:
- minor changes and fixes
Regards,
Martin
Re: EAP version 1.34.0-dev
Super update great job Martin.
- schuster666
- Posts: 52
- Joined: 13 Nov 2013 14:03
- Location: Germany / Neuss
Re: EAP version 1.34.0-dev
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.
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 --
-- but boring --
Re: EAP version 1.34.0-dev
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
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
- schuster666
- Posts: 52
- Joined: 13 Nov 2013 14:03
- Location: Germany / Neuss
Re: EAP version 1.34.0-dev
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.
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 --
-- but boring --
Re: EAP version 1.34.0-dev
Kein Problem! Bin froh, dass es kein Fehler in Automagic ist
Freundliche Grüsse
Martin
Freundliche Grüsse
Martin
Re: EAP version 1.34.0-dev
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:
Regards,
Martin
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
Regards,
Martin