Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated so you can create pass files in memory. #4

Merged
merged 2 commits into from
Sep 28, 2012

Conversation

ianlewis
Copy link
Contributor

I updated the API so that it allows for the creation of passbook pass files in memory rather than writing intermediary files to disk.

Writing files to disk in the way it was done previously can be problematic in a multi-threaded or multi-process environment where threads or processes could delete each other's files.

I updated the addFile() method so it takes a file name and a file like object. This was done so that files that were created in memory could be used as well as files that originally had a different file name than the file included in the final zip file.

I updated the create() method so that it returns a file object (By default a StringIO object) that can be read and sent to the browser in an HTTP response. You can override this so that the file gets written to disk or whatever if you like.

@ghost ghost assigned fara Sep 28, 2012
@fara fara merged commit 7d50c63 into devartis:master Sep 28, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants