Give user the ability to upload an image

Still a newbie…
I’m wanting the ability for users to upload images from their phone.

  1. Is there a description of how to get this done?
  2. Can it be done to Google Sheets? (Or is it only to Noodl cloud services?)

Many Thanks
James

Hi James.
I would recommend you try and have a look at the Open File Picker Node (which can be used together with the Upload File Node, if you want users to be able so save images in the backend).

The Open File Picker works on both desktop and phone. One thing to note about the node is that you can specify what files types are accepted - this is also described in the docs link I provided above (see “Accepted file types”). You could e.g. try to put in image/* to say that you allow all image type files to be uploaded, but not e.g. audio.

Try this out and let me know how it goes :slight_smile: I’m not sure what you mean with question 2. Could you elaborate a bit on your problem and its context? Do you want to upload images from users phone to a public google sheet?

Best regards, Victor from Noodl

Thanks for your reply Victor.
Yes. I’m wondering if I can upload to google sheets in the same way I can upload to the Noodl backend?

Regards
James

Thanks for the explanation! :slight_smile:
We do have the Google Sheet Module you can look at. But to my knowledge the module solely allows read-only at its current state (i.e. you can fetch data from your sheets, but not write to them, through the module itself).

However, writing data to your sheets might be something that’s possible with the next release of Noodl where we’ll introduce Cloud Functions, directly in Noodl. In the past we’ve used third party services to write to Google Sheets, and I’m pretty sure our own take on Cloud Functions could replace that. The next release of Noodl will be available in the beginning of 2023, and I’d be happy to check in with you again when it’s out :slight_smile:

Lastly, there might be a caveat, even if Cloud Functions can solve your initial problem. I haven’t checked this out fully yet, and I may have to come back to you when I’ve talked to my colleagues about it, but I know that in the current module it’s only possible to work with Google Sheets that are set to be publicly available. I’ll check with my colleagues and come back to you a few days after New Years Eve, when I’m back to work.

Best regards, Victor

Thank you again for your great customer service.

Look forward to hearing from you.

James

Ps
Happy New Year

Hi,

Happy New Year to you too!

To follow up on Victors reply. Not sure how Google Sheets handles files, but my assumption is that you would rather use Google Drive to store the file and then embed the URL to the file in your Google Sheet (or something similar). Please let me know if you know how it’s done in other cases (i.e. outside Noodl).

If my assumption about Google Drive is correct, it should be fairly easy to create an upload functionality using the REST node and the documentation here . Unfortunately we don’t have a module or prefab out of the box for this yet.

You will need to authenticate towards Google first. I using OAuth this is very easy in Noodl 2.8 since there is an OAuth prefab but there are other ways to give access to Google Drive so it probably depends on your use case.

Can you describe your use case a little further?

/Anders

Hi Anders,
I’ll give it a try when I have the chance.

I’m wanting to create an app for customers to upload and maintain their own Item names, Descriptions, Images and even Audio descriptions in a Google Sheet /database that the public can view!
I also want to allow the public to scan the corresponding QR code to link directly to the description page.

Many thanks.

Ok! From what I understand there is no specific way to host generic files on Google Sheets, so my suggestion is to upload the files to google drive and store the link in the cell. (There seem to be a setting for a cell to render what the URL is pointing to which might make it look a bit cleaner, but that probably need to be tested a bit).

In any way, I think one of the main question will be which account owns the data and who can read/write. E.g. should the users google account own the items, and then let the public view it (or even edit it?) or are they owned by your app, that then give the editing permissions to the specific users, etc, etc.

Unfortunately we don’t have a ready made module for Google Sheets (with write functionality) or Google Drive, so that would have to be created. Happy to help out when you get started!

/Anders