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

Rename serviceName to directUploadToken in AS' DirectUpload #44249

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions activestorage/app/assets/javascripts/activestorage.esm.js
Expand Up @@ -608,11 +608,11 @@ class BlobUpload {
let id = 0;

class DirectUpload {
constructor(file, url, serviceName, attachmentName, delegate) {
constructor(file, url, directUploadToken, attachmentName, delegate) {
this.id = ++id;
this.file = file;
this.url = url;
this.serviceName = serviceName;
this.directUploadToken = directUploadToken;
this.attachmentName = attachmentName;
this.delegate = delegate;
}
Expand All @@ -622,7 +622,7 @@ class DirectUpload {
callback(error);
return;
}
const blob = new BlobRecord(this.file, checksum, this.url, this.serviceName, this.attachmentName);
const blob = new BlobRecord(this.file, checksum, this.url, this.directUploadToken, this.attachmentName);
notify(this.delegate, "directUploadWillCreateBlobWithXHR", blob.xhr);
blob.create((error => {
if (error) {
Expand Down
6 changes: 3 additions & 3 deletions activestorage/app/assets/javascripts/activestorage.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions activestorage/app/javascript/activestorage/direct_upload.js
Expand Up @@ -5,11 +5,11 @@ import { BlobUpload } from "./blob_upload"
let id = 0

export class DirectUpload {
constructor(file, url, serviceName, attachmentName, delegate) {
constructor(file, url, directUploadToken, attachmentName, delegate) {
this.id = ++id
this.file = file
this.url = url
this.serviceName = serviceName
this.directUploadToken = directUploadToken
this.attachmentName = attachmentName
this.delegate = delegate
}
Expand All @@ -21,7 +21,7 @@ export class DirectUpload {
return
}

const blob = new BlobRecord(this.file, checksum, this.url, this.serviceName, this.attachmentName)
const blob = new BlobRecord(this.file, checksum, this.url, this.directUploadToken, this.attachmentName)
notify(this.delegate, "directUploadWillCreateBlobWithXHR", blob.xhr)

blob.create(error => {
Expand Down