Can't upload image through Podio's API, and have another user attach them to an item - podio

I have an issue regarding file uploads.
Files are uploaded correctly (using api or podio.js), but not all our users can attach them to products.
If one user (user Y) uploads an image, we get the following error, when another user (user X) tries to attach that image to an item: The user with id {user X} does not have the right update on file with id {itemId}.
Where are uploaded files stored? It doesn't seem like they are actually added to a workspace? User X is an admin in the workspace, but still can't attach to an item.

Related

Firebase's Google Authentication User Object returns profile path with 404 response

Am using Firebase Google Authentication in my App. If the user does not have a profile image, Google used to return a dynamic picture, made up from the user's first or last initial, or digraph where applicable, all depending on each person's name structure.
Eg : If the user name is Jack and he does not have profile picture the
URL will return this image.
But Past few weeks the Url Returned by the method
FirebaseAuth.getInstance().getCurrentUser().getPhotoUrl(); is a 404
page.
Because of this am getting Exceptions in Glide app. I need an image as above as my App is a conversation app, Which will help users to identify easily if they dont have a profile image. Please let me know if google changed the way accessing the image or it stopped permanently. Also provide me any alternatives to get this above image.

Example or template on how to do file upload in Google AppMaker

can anyone share with me the .zip file for Document Approval template because I can't open it since I'm not using GCS but I wanted to go through how they using Drive Picker widget to upload file and so on.
another thing is, where the file will be uploaded to? is it the owner's Drive? is it possible to upload the document to a single folder of a Team Drive instead? Really appreciate it if anyone can share with me some thoughts or any API will do, Thanks!
The only way to upload files that App Maker provides out of the box is Drive Picker widget and by default it uploads files to current user's Drive root folder. Drive Picker's API allows to change default upload folder, however App Maker doesn't expose the setting at this time. But it has onPickerInit event that provides you with pickerBuilder that you can use to customize your the picker:
// onPickerInit Drive Picker's event handler
var uploadView = new google.picker.DocsUploadView();
uploadView.setParent('ID of the folder to upload to');
pickerBuilder.addView(uploadView);
This trick works both for personal and Team Drive folders.
Note
It seems that setParent works only in combination with MULTISELECT_ENABLED drive picker feature enabled.
Right now, looks appmaker seems to ALWAYS adds an upload tab itself, so if I add another uploadview, I end up with two upload tabs, the first one uploading to the main folder and selected by default :(
My best guess for a workaround is to not add my own upload view, let the picker upload the file to the main folder, and move the file in the onSelect hook to its final destination. If there's a better way, I'd love the hear.

How to save a photo location or actual photo as a class variable?

I have a class with a variable named Photo. The user is using the PhotoChooserTask to select the photo, and it is being displayed in an Image control. This part of the application, the chooser and display, works fine.
I would like to save either the location/path of the chosen photo or the actual photo so that it will be available for display into an Image control when the user ran the application later.
The whole class is saved using serialization, and I don't know how to save/serialize the photo (or the photo path) that way.
The photo should be still available to the user through the Camera Roll as well.
Any help, link or code, would be greatly appreciated.
If you're using a PhotoChooserTask you will will get a PhotoResult instance from the PhotoChooserTask.Completed event.
You can then PhotoResult.ChosenPhoto stream and save the content to a byte array (easy serialization) or a file in Isolated Storage.

How to upload photos using CakePHP 2.0

I'm developing a simple web app and I just want to allow the user to upload some pictures.
should I just store the picture url on my database table or should I upload the whole picture?
how can I validate the size of the picture being uploaded?
how can I upload the picture from my controller?
thank you all!
I would NOT store the image data in the database. I would create a Behavior that will upload the image to the image directory and store a reference to that image. The behavior can then handle size, mime type, etc. Then add a file upload form to the controller and when the data goes to the model to be saved, it will automatically upload the image and put it where it goes.
If you do not want to build your own, here is a very popular behavior that someone has built.
https://github.com/jrbasso/MeioUpload
Or you could try this simple way of doing it (check the readme.md file) :
https://github.com/malikov/cakephp2.0-image-upload

Upload the customer's image while registering in a zen-cart application

How can we upload an image while registering the customer in zen-cart?
I would like to provide an option to upload the customer's image on registering with a zen-cart application. Is there a plug in for that?
Not that I've heard of. You would need to extend the customer_info table to hold the image file name, add an extra field to the account creation page and then handle the uploaded file in the account creation pages includes/modules/pages's header_php.php file.
However, there is a Zen Cart file upload class that provides an easy to use toolset for the last step. The admin banner page offers a good example to copy from.