mdarby / scribd_fu Goto Github PK
View Code? Open in Web Editor NEWOBSOLETE: Check out the below fork
Home Page: https://github.com/shwoodard/scribd_fu
License: MIT License
OBSOLETE: Check out the below fork
Home Page: https://github.com/shwoodard/scribd_fu
License: MIT License
a rails3 branch would be nice ;)
The display_ipaper method needs to allow for the use of https for secure pages that are embedding the code. Otherwise a mixed content security warning is presented to end users.
ipaper_access_key and ipaper_id columns must be created before setting scribd_fu with config.gem else relative error to missing columns are raised.
this is ok in development mode (first migrate, then edit environment.rb to add gem); it is however difficult to deploy it in production !
Had to finagle the source a bit to get Scribd_fu to work in Windows (I'll try to put this back up soon).
Now am having an issue with rendering the file-view in Chrome. It works fine in internet explorer, so not sure what the issue is.
I'm also a bit of a rails noob, and may be doing something silly.
Take a look at this pull request. This is probably fixed on paperclip 2.4.4
In the update action of my resumes controller I am doing the following:
@resume.update_attributes(params[:resume])
It's my understanding that this should trigger the after_save observer in scribd_fu. Though while paperclip acts accordingly (deletes existing document, uploads new document) scribd_fu is not acting appropriately. The document is not uploaded to scribd_fu.
My first question is: Why is after_save not being called?
Second question: Can support be added to delete the existing converted scribd file and upload the new document when the file_path parameter is not nil?
Is support for Scribd's HTML5 embed code coming soon?
Using Rails 3.0.3, the file scribd_fu.yml is not found in config. It seems that neither ::Rails.root.to_s nor RAILS_ROOT seem to contain anything. ConfigPath is therefore set to "/config/scribd_fu.yml".
If I just set ConfigPath to "config/scribd_fu.yml", the plugin works without problems.
I'm using paperclip and after I attach the file and it seems to work. The console shows:
Processing AssetsController#create (for 127.0.0.1 at 2010-03-21 17:52:18) [POST]
Parameters: {"commit"=>"Create Asset", "action"=>"create", "authenticity_token"=>"htg56mpBkJcMU1hqzS/L4Gm0pHzL0lM/L4+dYjblnMk=", "controller"=>"assets", "asset"=>{"assetable_type"=>"Resource", "assetable_id"=>"205", "asset"=>#File:/var/folders/Gp/Gp1sGZIQHCGtTTeb3AOUUE+++TI/-Tmp-/RackMultipart20100321-71799-1xyusyu-0}}
User Load (0.5ms) SELECT * FROM "users" WHERE ("users"."id" = '9') LIMIT 1
User Update (0.4ms) UPDATE "users" SET "updated_at" = '2010-03-21 21:52:18', "last_request_at" = '2010-03-21 21:52:18' WHERE "id" = 9
Asset Create (18.0ms) INSERT INTO "assets" ("ipaper_access_key", "created_at", "asset_file_name", "updated_at", "asset_file_size", "ipaper_id", "assetable_type", "asset_content_type", "assetable_id", "description", "asset_updated_at") VALUES(NULL, '2010-03-21 21:52:18', '1_1_Receipt_Dec_2007.pdf', '2010-03-21 21:52:18', 17803, NULL, 'Resource', 'application/pdf', 205, NULL, '2010-03-21 21:52:18')
[paperclip] Saving attachments.
[paperclip] saving assets/44/original.pdf
Asset Update (0.2ms) UPDATE "assets" SET "updated_at" = '2010-03-21 21:52:21', "created_at" = '2010-03-21 21:52:18', "ipaper_id" = 28714976, "asset_file_size" = 17803, "asset_updated_at" = '2010-03-21 21:52:18', "assetable_id" = 205, "asset_file_name" = '1_1_Receipt_Dec_2007.pdf', "ipaper_access_key" = 'MY KEY', "asset_content_type" = 'application/pdf', "assetable_type" = 'Resource' WHERE "id" = 44
[paperclip] Saving attachments.
Rendering assets/create
Rendered units/edit/_asset (1.0ms)
Completed in 2315ms (View: 3, DB: 0) | 200 OK [http://localhost/assets]
However, when I display the ipaper, I get an error that says "failed to convert."
When I go into the console, I get this:
Asset.find(44).conversion_successful?
=> nilAsset.find(44).scribdable?
=> falseAsset.find(44).upload_to_scribd
=> nil
Why is this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.