class ActiveStorage::Blob
def create_before_direct_upload!(key: nil, filename:, byte_size:, checksum:, content_type: nil, metadata: nil, service_name: nil, record: nil)
Once the form using the direct upload is submitted, the blob can be associated with the right record using
in order to produce the signed URL for uploading. This signed URL points to the key generated by the blob.
no file yet. It's intended to be used together with a client-side upload, which will first create the blob
Returns a saved blob _without_ uploading a file to the service. This blob will point to a key where there is
def create_before_direct_upload!(key: nil, filename:, byte_size:, checksum:, content_type: nil, metadata: nil, service_name: nil, record: nil) create! key: key, filename: filename, byte_size: byte_size, checksum: checksum, content_type: content_type, metadata: metadata, service_name: service_name end