Skip to content

Commit

Permalink
Fix RTDB upload file issue #527.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Jul 7, 2023
1 parent 77370ef commit 9f9910c
Show file tree
Hide file tree
Showing 47 changed files with 58 additions and 55 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Firebase Arduino Client Library for ESP8266 and ESP32",
"version": "4.3.14",
"version": "4.3.15",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "The library supports Firebase products e.g. Realtime database, Cloud Firestore database, Firebase Storage and Google Cloud Storage, Cloud Functions for Firebase and Cloud Messaging. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=Firebase Arduino Client Library for ESP8266 and ESP32

version=4.3.14
version=4.3.15

author=Mobizt

Expand Down
2 changes: 1 addition & 1 deletion src/FB_Const.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/FB_Error.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/FB_Network.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
7 changes: 5 additions & 2 deletions src/FB_Utils.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

/**
*
* This library supports Espressif ESP8266, ESP32 and Raspberry Pi Pico (RP2040)
*
* Created April 5, 2023
* Created July 7, 2023
*
* This work is a part of Firebase ESP Client library
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -1414,6 +1414,9 @@ namespace Base64Helper
size_t write = out.bufWrite;
out.bufWrite = 0;

if (write == 0)
return true;

if (out.outC && out.outC->write((uint8_t *)out.outT, write) == write)
return true;
else if (out.filetype != mb_fs_mem_storage_type_undefined && mbfs->write(mbfs_type out.filetype,
Expand Down
2 changes: 1 addition & 1 deletion src/Firebase.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/Firebase.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/FirebaseFS.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
4 changes: 2 additions & 2 deletions src/Firebase_Client_Version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef FIREBASE_CLIENT_VERSION
#define FIREBASE_CLIENT_VERSION "4.3.14"
#define FIREBASE_CLIENT_VERSION_NUM 40314
#define FIREBASE_CLIENT_VERSION "4.3.15"
#define FIREBASE_CLIENT_VERSION_NUM 40315

/* The inconsistent file version checking to prevent mixed versions compilation. */
#define FIREBASE_CLIENT_VERSION_CHECK(ver) (ver == FIREBASE_CLIENT_VERSION_NUM)
Expand Down
2 changes: 1 addition & 1 deletion src/firestore/FB_Firestore.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/firestore/FB_Firestore.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/functions/FB_Functions.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/functions/FB_Functions.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/functions/FunctionsConfig.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/functions/FunctionsConfig.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/functions/PocicyBuilder.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/functions/PolicyBuilder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/gcs/GCS.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/gcs/GCS.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/message/FCM.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/message/FCM.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
10 changes: 5 additions & 5 deletions src/rtdb/FB_RTDB.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

/**
* Google's Firebase Realtime Database class, FB_RTDB.cpp version 2.0.15
* Google's Firebase Realtime Database class, FB_RTDB.cpp version 2.0.16
*
* This library supports Espressif ESP8266, ESP32 and RP2040 Pico
*
* Created June 14, 2023
* Created July 7, 2023
*
* This work is a part of Firebase ESP Client library
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -2276,8 +2276,8 @@ bool FB_RTDB::encodeFileToClient(FirebaseData *fbdo, size_t bufSize, const MB_St
break;
}

// remaing data to wrire? write it
if (size == total && out.bufLen > 0)
// remainig data to wrire? write it
if (size == total && out.bufWrite > 0)
Base64Helper::writeOutput(Signer.mbfs, out);

MemoryHelper::freeBuffer(Signer.mbfs, data);
Expand Down
6 changes: 3 additions & 3 deletions src/rtdb/FB_RTDB.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

/**
* Google's Firebase Realtime Database class, FB_RTDB.h version 2.0.15
* Google's Firebase Realtime Database class, FB_RTDB.h version 2.0.16
*
* This library supports Espressif ESP8266, ESP32 and RP2040 Pico
*
* Created June 14, 2023
* Created July 7, 2023
*
* This work is a part of Firebase ESP Client library
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/QueryFilter.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/QueryFilter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/QueueInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/QueueInfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/QueueManager.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/QueueManager.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/stream/FB_MP_Stream.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/stream/FB_MP_Stream.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/stream/FB_Stream.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/rtdb/stream/FB_Stream.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/session/FB_Session.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/session/FB_Session.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/signer/Signer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/signer/Signer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/storage/FCS.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/storage/FCS.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/wcs/FB_Clients.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/wcs/base/FB_TCP_Client_Base.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/wcs/custom/FB_Custom_TCP_Client.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/wcs/esp32/FB_TCP_Client.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/wcs/esp32/FB_TCP_Client.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/wcs/esp8266/FB_TCP_Client.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/wcs/esp8266/FB_TCP_Client.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "Firebase_Client_Version.h"
#if !FIREBASE_CLIENT_VERSION_CHECK(40314)
#if !FIREBASE_CLIENT_VERSION_CHECK(40315)
#error "Mixed versions compilation."
#endif

Expand Down

0 comments on commit 9f9910c

Please sign in to comment.