We use proprietary and third party´s cookies to improve your experience and our services, identifying your Internet Browsing preferences on our website; develop analytic activities and display advertising based on your preferences. If you keep browsing, you accept its use. You can get more information on our Cookie Policy
Cookies Policy
Ask Your Question
0

Where are the logos, screenshots and other resource media stored in WStore

asked 2016-04-07 10:21:05 +0200

Eddy gravatar image

Hi,

I'm looking into using WStore to persist and lookup artifact data, including names, versions, descriptions, etc... I had a look at the MongoDB collections "wstoreoffering" and "wstoreresource" but couldn't find any binary, only URL paths.

My question is: where is the uploaded data effectively stored and how am I supposed to fetch it through the WStore REST API?

Best, Edoardo

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2016-04-07 11:38:52 +0200

Eddy gravatar image

Ah, on the filesystem...

From src/wstore/offerings/offerings_management.py

def _save_encoded_image(path, name, data):
"""
Saves into the filesystem a base64 encoded image
"""
f = open(os.path.join(path, name), "wb")
dec = base64.b64decode(data)
f.write(dec)
f.close()

Any plans to replace this implementation with proper database persistency? MongoDB doesn't get offended by a couple MBs of binary data...

edit flag offensive delete link more
0

answered 2016-04-07 13:13:57 +0200

fdelavega gravatar image

Hi Edoardo,

We evaluated the usage of MongoDB for saving the media files; nevertheless, we decided to save them in the filesystem since we thought that it did not worth the additional complexity of using GridFS (in order to deal with 16MB size limitation) taking into account that WStore does not use these files very much.

At this moment WStore is in support mode, so we are not developing new features (only bug fixing). Nevetheless, we think this is a nice-to-have feature, so if you finally do something in this regard, it will be nice if you can contribute it to the existing software.

Best regards, Francisco

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-04-07 10:21:05 +0200

Seen: 3,405 times

Last updated: Apr 07 '16