Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Pythonista Upload Photos from Library
-
-
@DavinE said:
i do not need to remove any files ?
No because you did not create any file, you work in memory
-
@DavinE said:
goes this example also with the (german: Dateien App) Files App to select any file on my Documents ?
It should also be ok, but you would have to select a file and read it as binary file
-
-
-
@DavinE said:
this code snippet io.BytesIO()do that ?
Yes, it creates a bytes buffer accessible like a file object, with seek, read... what is needed by ftp.storbinary
-
-
-
@cvp said:
Yes, it creates a bytes buffer accessible like a file object, with seek, read... what is needed by ftp.storbinary
Thanks for your time to explain my that
-
@DavinE said:
the same way above ?
and how can i select them in Pythonista ?No no. Picked phoTos reads for you the photo file in memory (asset)
If you want to get all files of Files App, you will need to define an external open folder in the left browser of Pythonista.
-
Or you select a file in the Files App, not in Pythonista, and you share it to a Pythonista script which will receive the url of a temporary copy of the file, that you can upload to your ftp server.
But in this case, the selection is done in the Files App. -
@cvp said:
@DavinE said:
the same way above ?
and how can i select them in Pythonista ?No no. Picked phoTos reads for you the photo file in memory (asset)
If you want to get all files of Files App, you will need to define an external open folder in the left browser of Pythonista.
okay and then Pythonista have access to this folder and can Upload it ?
do you know the path of this external folders ? -
@DavinE said:
do you know the path of this external folders ?
It depends on which folder?
Example, I have a Numbers folder in iCloud Drive, for the standard app. Path is
/private/var/mobile/Library/Mobile Documents/com~apple~Numbers/Documents/Myfile.numbers -
@DavinE said:
and then Pythonista have access to this folder and can Upload it ?
Yes if you define the wanted folder in your external folders
-
@cvp Works this also with an folder on iPhone not in iCloud ?
-
-
Example of path of an image of a private folder on my iPad
/private/var/mobile/Containers/Shared/AppGroup/EF3F9065-AD98-4DE3-B5DB-21170E88B77F/File Provider Storage/Photos vacances/20200728_140243.jpg
And copy works
-
@cvp
i Tried it too and works for me ;)
but my number is different on my iPhone i need to look how i get my Paths on local because i got 6 different Devices xD -
-
@cvp,
i Have a Problem with the present of the view...
i get this error:in uploadCustomerFiles_FTP__ACTION_Button iv.present('fullscreen') ValueError: View is already being presented or animation is in progress
can i use in my main view another view ?
The first Images Present works but the second one creates the error