Andrew Davidsburg
Posts: 0
Joined: Sun Aug 03, 2014 5:29 pm

Upload image from a URL instead of local file system?

Is it possible to save an image from a url to the database as opposed to uploading a file from a local filesystem? ie input http://upload.wikimedia.org/wikipedia... and upload it to the database.

Thanks!

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Upload image from a URL instead of local file system?

Hello Andrew,

Yes, this is possible.
You can even generate your file on "fly".
Current DB Files collection provides API to save file if you have binary content.
If you can get file binary content via url, then you will succeed.

Andrew Davidsburg
Posts: 0
Joined: Sun Aug 03, 2014 5:29 pm

Upload image from a URL instead of local file system?

Thanks Alena,

HAving a little trouble making this work. Can you clarify how I would input the binary data into the database?

Thanks!

Andrew

Andrew Davidsburg
Posts: 0
Joined: Sun Aug 03, 2014 5:29 pm

Upload image from a URL instead of local file system?

To clarify I've got the files in base64 format but I keep getting the error below?Is there additional info that needs to be sent with the data? I have decoded the data elsewhere with no issues. Thanks!

{"code":"BCXX002","description":"Cannot consume content type"}

Andrew Davidsburg
Posts: 0
Joined: Sun Aug 03, 2014 5:29 pm

Upload image from a URL instead of local file system?

Just found this from Yuri, going to give it a shot.
https://getsatisfaction.com/apperyio/...

Return to “Issues”