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

First time here? Check out the FAQ!

Ask Your Question
0

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

asked Apr 7 '16

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

2 answers

Sort by » oldest newest most voted
0

answered Apr 7 '16

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 link
0

answered Apr 7 '16

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 link
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: Apr 7 '16

Seen: 7,597 times

Last updated: Apr 07 '16