R2R
Posts: 0
Joined: Wed May 07, 2014 7:24 pm

How to replace images in the Files collection using File API?

Is there a way to assign an ID to an image (for ex: a profile image) in the built-in Files collection in a database? This would be similar to a password, which has a user ID assigned to it. When a password is changed, it is updated for that user, instead of being ADDED as another database item. I'd like my users to upload a picture of themselves (a headshot), and each time they upload a new picture, the old one is REPLACED in the database (even if it's a different filename).

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to replace images in the Files collection using File API?

Hi R2R,

Currently there is no way to update file in Files system collection.

Here is more info about files API:

http://devcenter.appery.io/documentat...

In this case you can use other custom collection(not system Files) where you can create and update items.

Regards.

xman
Posts: 0
Joined: Sun Jul 06, 2014 7:05 pm

How to replace images in the Files collection using File API?

Hi Yurii, there is a different thread running where I've asked similar question. One of my feature is stuck because of several limitations of the "Files" collection and the operation that can be performed on it. See: https://getsatisfaction.com/apperyio/...

So here is my problem - my app also needs to run on the web (where there is no Camera device). I need to provide the users ability to upload a profile picture from their PC and be able to display that picture. How do I do that?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How to replace images in the Files collection using File API?

Hi xman,

I've answered you on that thread - http://devcenter.appery.io/documentat... please take a look.

Your problem is not a problem. You just need to upload image (chosen from local computer by user). So you can do it like it described here: http://devcenter.appery.io/tutorials/...

Regards.

Return to “Issues”