
Recherche avancée
Médias (91)
-
Géodiversité
9 septembre 2011, par ,
Mis à jour : Août 2018
Langue : français
Type : Texte
-
USGS Real-time Earthquakes
8 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
SWFUpload Process
6 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (81)
-
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)
Sur d’autres sites (5721)
-
Revision 4b8f7a67e5 : Merge "configure : special case flag test for clang" into experimental
4 mai 2013, par James ZernMerge "configure : special case flag test for clang" into experimental
-
"File doesn't exist" - streamio FFMPEG on screenshot after create method
3 mai 2013, par dodgerogers747I have videos being directly uploaded to S3 using Amazon's CORS configuration. Videos are uploaded via a dedicated S3 form, once they have been uploaded successfully the URL of the video is appended to the @video.file hidden_field via javascript and then the video saves.
I can't get this
after_save
method to work which takes a screenshot of the video and saves it to S3 via carrierwave after the video has been saved as a rails object. ( It was previously working using a carrierwave video upload instance )It errors out with
Errno::ENOENT - No such file or directory - the file 'http://bucket-name.s3.amazonaws.com/uploads/video/file/secure-random-hex/video_name.m4v' does not exist:
I have tried running this method as a class method to call it from the console but it always comes back with the same error, even though the video exists.My bucket is set to public, read and write. How come it doesn't think the file exists ?
If anyone needs more code just shout, thanks in advance.
application trace
Started POST "/videos" for 127.0.0.1 at 2013-05-03 10:48:07 -0700
Processing by VideosController#create as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"MAHxrVcmPDtVIMfDWZBwL0YnzaAaAe1PTGip5M4OVoY=", "video"=>{"user_id"=>"5", "file"=>"http://bucket-name.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v"}}
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 5 LIMIT 1
(0.1ms) BEGIN
SQL (20.5ms) INSERT INTO `videos` (`created_at`, `file`, `question_id`, `screenshot`, `updated_at`, `user_id`) VALUES ('2013-05-03 17:48:07', 'http://teebox-network.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v', NULL, NULL, '2013-05-03 17:48:07', 5)
(44.0ms) ROLLBACK
Completed 500 Internal Server Error in 71ms
Errno::ENOENT - No such file or directory - the file 'http://teebox-network.s3.amazonaws.com/uploads/video/file/secure-random-hex/video.m4v' does not exist:
(gem) streamio-ffmpeg-0.9.0/lib/ffmpeg/movie.rb:10:in `initialize'
app/models/video.rb:25:in `new'
app/models/video.rb:25:in `take_screenshot'video.rb
attr_accessible :user_id, :question_id, :file, :screenshot
belongs_to :question
belongs_to :user
default_scope order('created_at DESC')
after_create :take_screenshot
mount_uploader :screenshot, ImageUploader
validates_presence_of :user_id, :file
def take_screenshot
FFMPEG.ffmpeg_binary = '/opt/local/bin/ffmpeg'
movie = FFMPEG::Movie.new("#{self.file}")
self.screenshot = movie.screenshot("#{Rails.root}/public/uploads/tmp/screenshots/#{File.basename(self.file)}.jpg", seek_time: 2 )
self.save!
endvideos/_form.html.erb
<form action="http://bucket-name.s3.amazonaws.com" data-remote="true" class="direct-upload" enctype="multipart/form-data" method="post">
<input type="hidden" />
<input type="hidden" value="ACCESS_KEY" />
<input type="hidden" value="public-read" />
<input type="hidden" />
<input type="hidden" />
<input type="hidden" value="201" />
<input type="file" />
</form>
<%= form_for @video, html: { multipart: true, id: "new_video" }, remote: true do |f| %>
<% if @video.errors.any? %>
<div>
<h2><%= pluralize(@video.errors.count, "error") %> prohibited this post from being saved:</h2>
<ul>
<% @video.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<%= f.hidden_field :user_id, value: current_user.id %>
<%= f.hidden_field :file %><br />
<% end %>ImageUploader
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::RMagick
include Sprockets::Helpers::RailsHelper
include Sprockets::Helpers::IsolatedHelper
storage :fog
before :store, :remember_cache_id
after :store, :delete_tmp_dir
def cache_dir
Rails.root.join('public/uploads/tmp/')
end
def remember_cache_id(new_file)
@cache_id_was = cache_id
end
def delete_tmp_dir(new_file)
if @cache_id_was.present? && @cache_id_was =~ /\A[\d]{8}\-[\d]{4}\-[\d]+\-[\d]{4}\z/
FileUtils.rm_rf(File.join(root, cache_dir, @cache_id_was))
end
end
process resize_and_pad: [306, 150, '#000']
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
def extension_white_list
%w(jpg)
# %w(ogg ogv 3gp mp4 m4v webm mov)
end -
Revision 6723e34224 : Merge "fix permissions on cpplint.py (0644->0755)" into experimental
4 mai 2013, par James ZernMerge "fix permissions on cpplint.py (0644->0755)" into experimental