wrong order of params in file uploads

This commit is contained in:
or-else
2021-06-23 14:03:41 -07:00
parent cf5fd9753c
commit 019b270242
10 changed files with 61 additions and 35 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "tinode-webapp",
"description": "Tinode messenger for the web",
"version": "0.17.2",
"version": "0.17.4",
"repository": {
"type": "git",
"url": "https://github.com/tinode/example-react-js.git"
@@ -67,7 +67,7 @@
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-intl": "^5.20.2",
"tinode-sdk": "^0.17.2"
"tinode-sdk": "^0.17.4"
},
"devDependencies": {
"@babel/core": "^7.14.5",
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit.
export const PACKAGE_VERSION = "0.17.2";
export const PACKAGE_VERSION = "0.17.4";
+2 -2
View File
@@ -705,7 +705,7 @@ class MessagesView extends React.Component {
// Make small preview to show while uploading.
imageScaled(blob, IMAGE_PREVIEW_DIM, IMAGE_PREVIEW_DIM, -1, false,
(tinyBlob) => {
(tinyMine, tinyBlob) => {
// Convert tiny image into base64 for serialization and previewing.
blobToBase64(tinyBlob, (blobMime, tinyBits64) => {
let msg = Drafty.insertImage(null, 0, {
@@ -758,7 +758,7 @@ class MessagesView extends React.Component {
// Get image dimensions and size, optionally scale it down.
imageScaled(file, MAX_IMAGE_DIM, MAX_IMAGE_DIM, maxExternAttachmentSize, false,
// Success
(blob, mime, width, height, fname) => {
(mime, blob, width, height, fname) => {
this.setState({imagePreview: {
url: URL.createObjectURL(blob),
blob: blob,
+3 -3
View File
@@ -721,7 +721,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "PACKAGE_VERSION": () => (/* binding */ PACKAGE_VERSION)
/* harmony export */ });
const PACKAGE_VERSION = "0.17.2";
const PACKAGE_VERSION = "0.17.4";
/***/ }),
@@ -3765,7 +3765,7 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
}
const uploadCompletionPromise = uploader.upload(blob);
(0,_lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_14__.imageScaled)(blob, _config_js__WEBPACK_IMPORTED_MODULE_13__.IMAGE_PREVIEW_DIM, _config_js__WEBPACK_IMPORTED_MODULE_13__.IMAGE_PREVIEW_DIM, -1, false, tinyBlob => {
(0,_lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_14__.imageScaled)(blob, _config_js__WEBPACK_IMPORTED_MODULE_13__.IMAGE_PREVIEW_DIM, _config_js__WEBPACK_IMPORTED_MODULE_13__.IMAGE_PREVIEW_DIM, -1, false, (tinyMine, tinyBlob) => {
(0,_lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_14__.blobToBase64)(tinyBlob, (blobMime, tinyBits64) => {
let msg = Drafty.insertImage(null, 0, {
mime: mime,
@@ -3811,7 +3811,7 @@ class MessagesView extends (react__WEBPACK_IMPORTED_MODULE_0___default().Compone
handleAttachImage(file) {
const maxExternAttachmentSize = this.props.tinode.getServerLimit('maxFileUploadSize', _config_js__WEBPACK_IMPORTED_MODULE_13__.MAX_EXTERN_ATTACHMENT_SIZE);
(0,_lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_14__.imageScaled)(file, _config_js__WEBPACK_IMPORTED_MODULE_13__.MAX_IMAGE_DIM, _config_js__WEBPACK_IMPORTED_MODULE_13__.MAX_IMAGE_DIM, maxExternAttachmentSize, false, (blob, mime, width, height, fname) => {
(0,_lib_blob_helpers_js__WEBPACK_IMPORTED_MODULE_14__.imageScaled)(file, _config_js__WEBPACK_IMPORTED_MODULE_13__.MAX_IMAGE_DIM, _config_js__WEBPACK_IMPORTED_MODULE_13__.MAX_IMAGE_DIM, maxExternAttachmentSize, false, (mime, blob, width, height, fname) => {
this.setState({
imagePreview: {
url: URL.createObjectURL(blob),
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+48 -22
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,3 +1,3 @@
// This is a generated file. Don't edit.
const PACKAGE_VERSION = "0.17.2";
const PACKAGE_VERSION = "0.17.4";