Uploading images on hosting services

532 views
Skip to first unread message

Teen Wackies

unread,
Dec 6, 2019, 4:17:56 AM12/6/19
to MIT App Inventor Forum

Hi everyone! I wanna try to create an app which allow me to upload images on some hosting service like Imgur or TinyPic, and saving the link. Can I use only WebViewer or I also need the Web component? And how would I do that, anyway?

 

Thank you!

TimAI2

unread,
Dec 6, 2019, 4:36:10 AM12/6/19
to MIT App Inventor Forum
The webviewer is not connected to the android file system in AI2, you will have to use the web component.

You will probably also need to use/understand the APIs provided by Imgur/TinyPic


Teen Wackies

unread,
Dec 6, 2019, 7:57:15 AM12/6/19
to MIT App Inventor Forum

Thank you. However, I’ve found a previous post, which states that it’s not possible to upload images on Imgur with App Inventor:

https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!searchin/mitappinventortest/How$20to$20upload$20images$20to$20imgur$20and$20get$20image$20URL$3F%7Csort:date/mitappinventortest/9MpDdO58Xgk/zjUZ6t_jAgAJ

 

So, is there another way to upload images and get the URL?

 

Thanks again.

TimAI2

unread,
Dec 6, 2019, 8:15:47 AM12/6/19
to MIT App Inventor Forum
imgur api looks doable to me.
They have updated their docs and api since 2017

Follow the link I provided then click on Image to see curl examples for POST and GET  (does look like you have to convert to base64 first)

You will need to "interpret" the curl command to create a url to use

Teen Wackies

unread,
Dec 6, 2019, 9:09:03 AM12/6/19
to MIT App Inventor Forum
Ok, I will try it.

Thank you very much!
Message has been deleted

TimAI2

unread,
Dec 8, 2019, 4:54:38 PM12/8/19
to MIT App Inventor Forum
@ Teen Wackies

you messages are going into spam, can't retrieve them. here is your last one:

I tried to follow the guide that was suggested me here, to add API Imgur to my app: https://apidocs.imgur.com/?version=latest but unfortunately there are some not really clear points, so I need a few additional clarifications.

My concerns are the following:

 

-          according to that guide, I’m supposed to register my app on Postman, but what’s unclear to me is how should I proceed, since my app is still being developed on App Inventor;

-          apparently, there’s a rate limit of 1250 uploads per day, otherwise the app will be blocked: so, this means that, in the optimistic expectation that my app will be downloaded by over 1250 users, I should expect trouble?

-          if I want to monetize my app, I should register with RapidAPI, and choose a pricing plan: at this point I wonder, is there any valid and free alternative to Imgur? And if, for example, I implement a registration system to Dropbox for my users, so that each of them can upload his/her photo independently?

 

Thank you for your answers. 


Why not use Google drive or your own web server?

Teen Wackies

unread,
Dec 9, 2019, 3:28:09 AM12/9/19
to MIT App Inventor Forum

Yes, I might consider using Google drive or a web server, but I’d prefer a hosting which allow each user to crate his/her own personal space, that’s why I was wondering if there was a way to implement a hosting registration system for each user. 

TimAI2

unread,
Dec 10, 2019, 7:07:05 AM12/10/19
to MIT App Inventor Forum
Exact same question also asked by "Kate Murry" on Thunkable Classic

BodyMindPower

unread,
Dec 10, 2019, 8:59:02 AM12/10/19
to mitappinv...@googlegroups.com
Here is a brand-new extension for that:

And each user can create her / his own personal space (on Google Drive) to upload her / his images:

Teen Wackies

unread,
Dec 10, 2019, 11:24:45 AM12/10/19
to MIT App Inventor Forum
Thank you so much!

Teen Wackies

unread,
Dec 10, 2019, 11:25:22 AM12/10/19
to MIT App Inventor Forum
Yes, Kate is my wife! :-)

ABG

unread,
Dec 10, 2019, 1:12:40 PM12/10/19
to MIT App Inventor Forum
(added to Images section of FAQ)
ABG

TimAI2

unread,
Dec 10, 2019, 2:31:34 PM12/10/19
to MIT App Inventor Forum
Note: currently with that extension, all uploaded images are "owned" by the developer, even though they go into the user's designated folder on their google drive, and the folder must be editable by anyone.

BodyMindPower

unread,
Dec 10, 2019, 5:35:52 PM12/10/19
to MIT App Inventor Forum
@Tim 
How do you come to this assumption?
And, no, of course, there is a copyright and exploitation right for anyone who has created the images.

TimAI2

unread,
Dec 10, 2019, 6:06:49 PM12/10/19
to MIT App Inventor Forum
@Anke
Not an assumption, I tried the extension (owned as in Google account owned)
This is probably because the extension developer uses a google apps script on their account to upload the file
They may have come up with a new solution since I tried it....
The offerings I have produced do much the same.

To get ownership back, the user would have to go onto Google Drive, make a copy of the file, delete the original and rename the copy, 
losing the additional download and preview links provided by the extension.

The developers account might also run out of free space after @ 300,000 images are uploaded ;)

It is not a deal breaker, but folks should know....

I have been having a think about how it might be possible to provide a copy of the script to the user to create in their own account, through an app, but it is messy without resolving authentication.

Not sure how Taifun's Pick Google Account extension can help, but seems a good place to start

BodyMindPower

unread,
Dec 11, 2019, 3:30:31 AM12/11/19
to MIT App Inventor Forum
And what's wrong with my statement:
  "... there is a copyright and exploitation right for anyone who has created the images."
I think nothing.

Might be the user loses the possession, but not the ownership. (I think that's not just German law [Besitz / Eigentum], it's a fundamental difference.)

TimAI2

unread,
Dec 11, 2019, 4:27:12 AM12/11/19
to MIT App Inventor Forum
And what's wrong with my statement:
  "... there is a copyright and exploitation right for anyone who has created the images."
I think nothing.

For me, that is not the issue here....

BodyMindPower

unread,
Dec 11, 2019, 4:44:17 AM12/11/19
to MIT App Inventor Forum
@Tim "To get ownership back, ..."
As I said, you don't lose the ownership (property rights).
Or I don't get what you mean ...

TimAI2

unread,
Dec 11, 2019, 5:36:55 AM12/11/19
to MIT App Inventor Forum
I am concerned with file ownership in terms of google accounts, not copyright/property rights.

Files uploaded using the extension or methods I/others have previously demonstrated, will be owned by the owner (google account) of the published web app that actions the upload
The owner (google account) cannot, currently, programmatically change the ownership (google account) of uploaded files to that of the uploader 
(they can change ownership of Google Docs/Sheets/Slides/Forms with script)

Google account ownership changes of uploaded files can only, currently, be done manually in Google Drive by making a copy.

It would not be trivial to ask the user to setup their own web app (owned / published by their google account) to allow their uploaded files to be owned by them

This is compounded by the disconnect between the AI2 webviewer and the google account used on the device, and the difficulty of authentication through the webviewer (there are extensions out there that can overcome this, but creating a new project/web app on your mobile device is not straightforward.)

BodyMindPower

unread,
Dec 11, 2019, 6:58:16 AM12/11/19
to MIT App Inventor Forum
However, the problem seems to affect all cloud services and also has country-specific legal regulations depending on the respective service provider. In the EU / Germany they seem to be stricter than outside, especially the US.

https://www.e-recht24.de/artikel/blog-foren-web20/7115-rechtssicher-in-der-cloud-ihre-daten-bei-dropbox-icloud-google-drivea-co.html
"Google Drive Terms of Service - In the case of Google Drive is first to mention that Google in Germany far fewer rights granted than it does in English-speaking countries. For example, Google makes clear that the user retains all copyrights and existing intellectual property rights."

So tell us, what are (exactly) the implications that may result from your considerations for the user.

PS:
"I am concerned with file ownership in terms of google accounts, not copyright/property rights."

TimAI2

unread,
Dec 11, 2019, 10:15:59 AM12/11/19
to MIT App Inventor Forum
@Anke

We are going on about different things :)

Without the ability to assign file ownership (google account) to the files uploaded whether it be via an extension, or using blocks and a webapp,
app users should be aware that their uploaded files will not be private.

FWIW, ct_tricks' extension greatly simplifies things for developers.

Ct- tricks

unread,
Dec 12, 2019, 2:02:52 AM12/12/19
to MIT App Inventor Forum
Hey @TimAI2

You are right that, of each uploaded file the owner is ct_tricks. But when it's come to the point of privacy, Me { ct tricks } don't have access to any file or folder.
Yeah! i'm using google app script to run the entire function but i made the function fully dynamic so that anyone with his/her GDrive's folder id can uplaod image. If you notice that i have asked user to change there folder property to Anyone can edit, So the script is able to read/write data in there GDrive's folder. There is no hidden function running in background to steal any data from the user of Pictodrive extension.

Anyway you have pointed out a great thing to me... now i'll also provide another block, by using which, user can upload images with their ownership to the files.

TimAI2

unread,
Dec 12, 2019, 3:39:48 AM12/12/19
to MIT App Inventor Forum
@ ct-tricks

Of interest, how do you dis-associate from a file you own using GAS, do you orphan them? Don't they still fill up your storage quota ?

Would be interested in any script fragment you come up with to set ownership of files :) From what I have found, ownership can't be changed for uploaded files with GAS ?

Keep up the good work !!

Teen Wackies

unread,
Dec 12, 2019, 7:26:34 AM12/12/19
to MIT App Inventor Forum
@ ct-tricks

Hi! I’ve tried Pictodrive on App Inventor, but doesn’t seems to work at all.

Does it work only on Kodular?

 

Thanks.

BodyMindPower

unread,
Dec 12, 2019, 7:55:04 AM12/12/19
to mitappinv...@googlegroups.com
Try this:

Teen Wackies

unread,
Dec 12, 2019, 10:53:00 AM12/12/19
to MIT App Inventor Forum
Thank you, I'll try it! ;-)

Taifun

unread,
Dec 12, 2019, 11:39:24 AM12/12/19
to MIT App Inventor Forum
Yeah! i'm using google app script to run the entire function

@Ct-tricks: which means, the extension will only work, if you do not delete that script from your Google Drive?

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 


PS: keep up the good work!

BodyMindPower

unread,
Dec 12, 2019, 12:07:32 PM12/12/19
to MIT App Inventor Forum
And again:
You are right that, of each uploaded file the owner is ct_tricks.”
No, ct_tricks is the possessor, but not the owner (having the property rights).

Teen Wackies

unread,
Dec 12, 2019, 1:22:32 PM12/12/19
to MIT App Inventor Forum
I've tried this solution too, but it doesn't work! :-(


Il giorno giovedì 12 dicembre 2019 13:55:04 UTC+1, BodyMindPower ha scritto:
Try this:

TimAI2

unread,
Dec 12, 2019, 1:36:17 PM12/12/19
to MIT App Inventor Forum
"And again:
You are right that, of each uploaded file the owner is ct_tricks.”
No, ct_tricks is the possessor, but not the owner (having the property rights)."


NO !

ct_tricks is the owner on Google Drive, will come up as the owner on Google Drive, and has owner rights on Google Drive. The uploader has Editor rights to the file, on Google Drive, in their folder

Who actually has the "property rights" is a moot point, but probably the person who uploaded the file, how can you prove this, because the folder is open to edit by anyone, meaning that anyone with a google account and the folder ID can add files to that folder, including ct_tricks?

Taifun

unread,
Dec 12, 2019, 1:38:09 PM12/12/19
to MIT App Inventor Forum
And again:
You are right that, of each uploaded file the owner is ct_tricks.”
No, ct_tricks is the possessor, but not the owner (having the property rights).

@BodyMindPower: TImAI2 is talking about the technical owner, i.e. the corresponding Google account... you are talking about the legal owner
as developers mainly we are interested in the technical view, the legal view is something which can be discussed in lawyers communities...

I am concerned with file ownership in terms of google accounts, not copyright/property rights.
 
Taifun

BodyMindPower

unread,
Dec 12, 2019, 7:21:01 PM12/12/19
to MIT App Inventor Forum
@Teen Wackies  "I've tried this solution too, but it doesn't work! "
For me it works perfectly. So where is the problem?

BodyMindPower

unread,
Dec 12, 2019, 7:47:25 PM12/12/19
to MIT App Inventor Forum
@Tim  @Taifun
And for the third - and definitely the last time - there is no difference between a technical and legal view of the ownership of an image.
It only seems to be a question of whether one has access to this after uploading an image. The property rights (not the possession) to this file remain unaffected.

Note (received by mail from Ct_tricks):
"Now let’s come to the point of losing the file ownership. As i have deployed the script so i’m the owner of that complete functions running inside that script. so if any user upload image to the google drive he/she is using my script/functions that’s why the uploaded file shows Ct_tricks as an owner. But i don’t have any access to that file."

So again: What are the implications that may result from your considerations for the user?

ABG

unread,
Dec 12, 2019, 8:43:16 PM12/12/19
to MIT App Inventor Forum
Who gets the storage bill from Google?
ABG

Teen Wackies

unread,
Dec 13, 2019, 10:46:01 AM12/13/19
to MIT App Inventor Forum
It doesn't works on App Inventor, but in Kodular works perfectly.

So...I'll develop my app in Kodular! :-)

TimAI2

unread,
Dec 13, 2019, 11:03:12 AM12/13/19
to MIT App Inventor Forum
Correction: it does work on AppInventor ( I know this twice over as I wrote the original script and blocks for AppInventor, following a blog post by Tanaike, and I have tested the extension in AppInventor)

You have not been able to get it to work with your coding on AppInventor.....

Teen Wackies

unread,
Dec 13, 2019, 12:06:26 PM12/13/19
to MIT App Inventor Forum
Ooook, I'm trying again. :-(

BodyMindPower

unread,
Dec 17, 2019, 9:08:43 AM12/17/19
to MIT App Inventor Forum
You can always set “imageFormat” to jpg

because it doesn’t seem to matter what is entered here: jpg, png, gif, svg, …
The uploaded files (in the Google Drive directory) are always jpg files.

Teen Wackies

unread,
Dec 17, 2019, 12:49:03 PM12/17/19
to MIT App Inventor Forum
Yes, I did it! It works! :-)

Thank you so much!


Il giorno martedì 17 dicembre 2019 15:08:43 UTC+1, BodyMindPower ha scritto:
You can always set “imageFormat” to jpg

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages