Sha256: aa5d3001aa93570a3e5e59cfd949ca1c1f02bc230513f75bd9304c931b6e004e
Contents?: true
Size: 527 Bytes
Versions: 6
Compression:
Stored size: 527 Bytes
Contents
# encoding: UTF-8 require 'fileutils' module Spontaneous::Media # Represents a temporary file used to provide a media file that is visible # publically under a /media/tmp/* URL for passing to file fields for # asynchronous processing class TempFile < File def storage @site.default_storage end def media_dir F.join("tmp", padded_id) end def storage_path ["tmp", padded_id, filename] end def padded_id Spontaneous::Media.pad_id(owner.media_id) end end end
Version data entries
6 entries across 6 versions & 1 rubygems