files.com 1.1.813 → 1.1.815
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/doc/Files/APIConnectionError.html +1 -1
- data/doc/Files/APIError.html +1 -1
- data/doc/Files/AccountAlreadyExistsError.html +1 -1
- data/doc/Files/AccountLineItem.html +1 -1
- data/doc/Files/AccountOverdueError.html +1 -1
- data/doc/Files/Action.html +1 -1
- data/doc/Files/ActionLog.html +1 -1
- data/doc/Files/ActionNotificationExport.html +1 -1
- data/doc/Files/ActionNotificationExportResult.html +1 -1
- data/doc/Files/AdditionalAuthenticationRequiredError.html +1 -1
- data/doc/Files/AgentNode.html +1 -1
- data/doc/Files/AgentNodeConnection.html +1 -1
- data/doc/Files/AgentNodeInstance.html +1 -1
- data/doc/Files/AgentPushUpdate.html +1 -1
- data/doc/Files/AgentPushUpdateBlockedError.html +1 -1
- data/doc/Files/AgentUnavailableError.html +1 -1
- data/doc/Files/AgentUpgradeRequiredError.html +1 -1
- data/doc/Files/AiAssistantPersonality.html +1 -1
- data/doc/Files/AiTask.html +1 -1
- data/doc/Files/AiTaskCannotBeRunManuallyError.html +1 -1
- data/doc/Files/AlreadyCompletedError.html +1 -1
- data/doc/Files/Api.html +20 -13
- data/doc/Files/ApiClient/RequestLogContext.html +29 -29
- data/doc/Files/ApiClient/TransferSettings.html +721 -0
- data/doc/Files/ApiClient.html +756 -204
- data/doc/Files/ApiKey.html +1 -1
- data/doc/Files/ApiKeyIsDisabledError.html +1 -1
- data/doc/Files/ApiKeyIsPathRestrictedError.html +1 -1
- data/doc/Files/ApiKeyNotFoundError.html +1 -1
- data/doc/Files/ApiKeyOnlyForDesktopAppError.html +1 -1
- data/doc/Files/ApiKeyOnlyForFileOperationsError.html +1 -1
- data/doc/Files/ApiKeyOnlyForMobileAppError.html +1 -1
- data/doc/Files/ApiKeyOnlyForOfficeIntegrationError.html +1 -1
- data/doc/Files/ApiKeySessionsNotSupportedError.html +1 -1
- data/doc/Files/ApiRequestLog.html +1 -1
- data/doc/Files/App.html +1 -1
- data/doc/Files/As2IncomingMessage.html +1 -1
- data/doc/Files/As2OutgoingMessage.html +1 -1
- data/doc/Files/As2Partner.html +1 -1
- data/doc/Files/As2Station.html +1 -1
- data/doc/Files/AttachmentTooLargeError.html +1 -1
- data/doc/Files/AuthenticationError.html +1 -1
- data/doc/Files/AuthenticationRequiredError.html +1 -1
- data/doc/Files/Auto.html +1 -1
- data/doc/Files/Automation.html +1 -1
- data/doc/Files/AutomationAuthoringSchema.html +1 -1
- data/doc/Files/AutomationCannotBeRunManuallyError.html +1 -1
- data/doc/Files/AutomationExecutionNode.html +1 -1
- data/doc/Files/AutomationLog.html +1 -1
- data/doc/Files/AutomationRun.html +1 -1
- data/doc/Files/AutomationsUnavailableError.html +1 -1
- data/doc/Files/BadRequestError.html +1 -1
- data/doc/Files/BandwidthSnapshot.html +1 -1
- data/doc/Files/Behavior.html +1 -1
- data/doc/Files/BehaviorNotAllowedOnRemoteServerError.html +1 -1
- data/doc/Files/BillingInformationHiddenError.html +1 -1
- data/doc/Files/BillingPermissionRequiredError.html +1 -1
- data/doc/Files/BufferedUploadDisabledForThisDestinationError.html +1 -1
- data/doc/Files/Bundle.html +1 -1
- data/doc/Files/BundleAction.html +1 -1
- data/doc/Files/BundleDownload.html +1 -1
- data/doc/Files/BundleMaximumUsesReachedError.html +1 -1
- data/doc/Files/BundleNotification.html +1 -1
- data/doc/Files/BundleOnlyAllowsPreviewsError.html +1 -1
- data/doc/Files/BundleOperationRequiresSubfolderError.html +1 -1
- data/doc/Files/BundlePath.html +1 -1
- data/doc/Files/BundlePathNotFoundError.html +1 -1
- data/doc/Files/BundlePermissionRequiredError.html +1 -1
- data/doc/Files/BundleRecipient.html +1 -1
- data/doc/Files/BundleRegistration.html +1 -1
- data/doc/Files/BundleRegistrationCodeFailedError.html +1 -1
- data/doc/Files/BundleRegistrationNotFoundError.html +1 -1
- data/doc/Files/CannotAdministerHigherLevelUserError.html +1 -1
- data/doc/Files/CannotDownloadDirectoryError.html +1 -1
- data/doc/Files/CannotLoginWhileUsingKeyError.html +1 -1
- data/doc/Files/CantActForOtherUserError.html +1 -1
- data/doc/Files/CantMoveWithMultipleLocationsError.html +1 -1
- data/doc/Files/ChatMessage.html +1 -1
- data/doc/Files/ChatSession.html +1 -1
- data/doc/Files/ChildSiteManagementPolicy.html +1 -1
- data/doc/Files/Clickwrap.html +1 -1
- data/doc/Files/CodeNotFoundError.html +1 -1
- data/doc/Files/ConfigurationLockedPathError.html +1 -1
- data/doc/Files/ContactAdminForPasswordChangeHelpError.html +1 -1
- data/doc/Files/CouldNotCreateParentError.html +1 -1
- data/doc/Files/CustomDomain.html +1 -1
- data/doc/Files/DatetimeParseError.html +1 -1
- data/doc/Files/DesktopConfigurationProfile.html +1 -1
- data/doc/Files/DestinationExistsError.html +1 -1
- data/doc/Files/DestinationFolderLimitedError.html +1 -1
- data/doc/Files/DestinationParentConflictError.html +1 -1
- data/doc/Files/DestinationParentDoesNotExistError.html +1 -1
- data/doc/Files/DestinationSameError.html +1 -1
- data/doc/Files/DestinationSiteMismatchError.html +1 -1
- data/doc/Files/DirectConnectionInfo.html +1 -1
- data/doc/Files/DnsRecord.html +1 -1
- data/doc/Files/DoesNotSupportSortingError.html +1 -1
- data/doc/Files/DuplicateShareRecipientError.html +1 -1
- data/doc/Files/EmailIncomingMessage.html +1 -1
- data/doc/Files/EmailLog.html +1 -1
- data/doc/Files/Error.html +2 -2
- data/doc/Files/Errors.html +1 -1
- data/doc/Files/EventChannel.html +1 -1
- data/doc/Files/EventDeliveryAttempt.html +1 -1
- data/doc/Files/EventRecord.html +1 -1
- data/doc/Files/EventSubscription.html +1 -1
- data/doc/Files/EventTarget.html +1 -1
- data/doc/Files/ExavaultApiRequestLog.html +1 -1
- data/doc/Files/ExceededRuntimeLimitError.html +1 -1
- data/doc/Files/Expectation.html +1 -1
- data/doc/Files/ExpectationAlreadyHasOpenWindowError.html +1 -1
- data/doc/Files/ExpectationEvaluation.html +1 -1
- data/doc/Files/ExpectationIncident.html +1 -1
- data/doc/Files/ExpectationNotManualTriggerError.html +1 -1
- data/doc/Files/ExpiredPrivateKeyError.html +1 -1
- data/doc/Files/ExpiredPublicKeyError.html +1 -1
- data/doc/Files/ExportFailureError.html +1 -1
- data/doc/Files/ExportNotReadyError.html +1 -1
- data/doc/Files/ExternalEvent.html +1 -1
- data/doc/Files/FailedToChangePasswordError.html +1 -1
- data/doc/Files/File.html +2019 -1515
- data/doc/Files/FileAction.html +1 -1
- data/doc/Files/FileActionError.html +1 -1
- data/doc/Files/FileComment.html +1 -1
- data/doc/Files/FileCommentReaction.html +1 -1
- data/doc/Files/FileLockedError.html +1 -1
- data/doc/Files/FileMigration.html +1 -1
- data/doc/Files/FileMigrationLog.html +1 -1
- data/doc/Files/FileNotFoundError.html +1 -1
- data/doc/Files/FileNotUploadedError.html +1 -1
- data/doc/Files/FilePendingProcessingError.html +1 -1
- data/doc/Files/FileProcessingErrorError.html +1 -1
- data/doc/Files/FileTooBigToDecryptError.html +1 -1
- data/doc/Files/FileTooBigToEncryptError.html +1 -1
- data/doc/Files/FileUploadNotFoundError.html +1 -1
- data/doc/Files/FileUploadPart.html +1 -1
- data/doc/Files/FileUploadedToWrongRegionError.html +1 -1
- data/doc/Files/FileUtils.html +1 -1
- data/doc/Files/FilenameTooLongError.html +1 -1
- data/doc/Files/FilesAgentFailedAuthorizationError.html +1 -1
- data/doc/Files/FilesNativeStorageOverloadedError.html +1 -1
- data/doc/Files/Folder.html +1 -1
- data/doc/Files/FolderAdminOrBillingPermissionRequiredError.html +1 -1
- data/doc/Files/FolderAdminPermissionRequiredError.html +1 -1
- data/doc/Files/FolderLockedError.html +1 -1
- data/doc/Files/FolderMustNotBeAFileError.html +1 -1
- data/doc/Files/FolderNotEmptyError.html +1 -1
- data/doc/Files/FoldersNotAllowedError.html +1 -1
- data/doc/Files/FormField.html +1 -1
- data/doc/Files/FormFieldSet.html +1 -1
- data/doc/Files/FtpActionLog.html +1 -1
- data/doc/Files/FullPermissionRequiredError.html +1 -1
- data/doc/Files/GpgKey.html +1 -1
- data/doc/Files/Group.html +1 -1
- data/doc/Files/GroupNotFoundError.html +1 -1
- data/doc/Files/GroupUser.html +1 -1
- data/doc/Files/History.html +1 -1
- data/doc/Files/HistoryExport.html +1 -1
- data/doc/Files/HistoryExportResult.html +1 -1
- data/doc/Files/HistoryPermissionRequiredError.html +1 -1
- data/doc/Files/HistoryUnavailableError.html +1 -1
- data/doc/Files/HolidayCalendar.html +1 -1
- data/doc/Files/HolidayRegion.html +1 -1
- data/doc/Files/Image.html +1 -1
- data/doc/Files/InAppAiAssistantUnavailableError.html +1 -1
- data/doc/Files/InboundS3Log.html +1 -1
- data/doc/Files/InboxNotFoundError.html +1 -1
- data/doc/Files/InboxRecipient.html +1 -1
- data/doc/Files/InboxRegistration.html +1 -1
- data/doc/Files/InboxRegistrationCodeFailedError.html +1 -1
- data/doc/Files/InboxUpload.html +1 -1
- data/doc/Files/InsufficientPermissionForParamsError.html +1 -1
- data/doc/Files/InsufficientPermissionForSiteError.html +1 -1
- data/doc/Files/IntegrationCentricProfile.html +1 -1
- data/doc/Files/InternalGeneralErrorError.html +1 -1
- data/doc/Files/InvalidBodyError.html +1 -1
- data/doc/Files/InvalidBundleCodeError.html +1 -1
- data/doc/Files/InvalidCredentialsError.html +1 -1
- data/doc/Files/InvalidCursorError.html +1 -1
- data/doc/Files/InvalidCursorTypeForSortError.html +1 -1
- data/doc/Files/InvalidEtagsError.html +1 -1
- data/doc/Files/InvalidFileTypeError.html +1 -1
- data/doc/Files/InvalidFilenameError.html +1 -1
- data/doc/Files/InvalidFilterAliasCombinationError.html +1 -1
- data/doc/Files/InvalidFilterFieldError.html +1 -1
- data/doc/Files/InvalidFilterParamError.html +1 -1
- data/doc/Files/InvalidFilterParamFormatError.html +1 -1
- data/doc/Files/InvalidFilterParamValueError.html +1 -1
- data/doc/Files/InvalidInputEncodingError.html +1 -1
- data/doc/Files/InvalidInterfaceError.html +1 -1
- data/doc/Files/InvalidOauthError.html +1 -1
- data/doc/Files/InvalidOauthProviderError.html +1 -1
- data/doc/Files/InvalidOrExpiredCodeError.html +1 -1
- data/doc/Files/InvalidParameterError.html +5 -1
- data/doc/Files/InvalidPathError.html +1 -1
- data/doc/Files/InvalidPriorityColorError.html +1 -1
- data/doc/Files/InvalidRangeError.html +1 -1
- data/doc/Files/InvalidReturnToUrlError.html +1 -1
- data/doc/Files/InvalidSearchQueryError.html +1 -1
- data/doc/Files/InvalidSessionError.html +1 -1
- data/doc/Files/InvalidSiteError.html +1 -1
- data/doc/Files/InvalidSortFieldError.html +1 -1
- data/doc/Files/InvalidSortFilterCombinationError.html +1 -1
- data/doc/Files/InvalidUploadOffsetError.html +1 -1
- data/doc/Files/InvalidUploadPartGapError.html +1 -1
- data/doc/Files/InvalidUploadPartSizeError.html +1 -1
- data/doc/Files/InvalidUsernameOrPasswordError.html +1 -1
- data/doc/Files/InvalidWorkspaceIdHeaderError.html +1 -1
- data/doc/Files/InvalidZipFileError.html +1 -1
- data/doc/Files/Invoice.html +1 -1
- data/doc/Files/InvoiceLineItem.html +1 -1
- data/doc/Files/IpAddress.html +1 -1
- data/doc/Files/KeyLifecycleRule.html +1 -1
- data/doc/Files/List.html +1 -1
- data/doc/Files/Lock.html +1 -1
- data/doc/Files/LockOperationBusyError.html +1 -1
- data/doc/Files/LockedOutError.html +1 -1
- data/doc/Files/LockoutRegionMismatchError.html +1 -1
- data/doc/Files/MetadataCategory.html +1 -1
- data/doc/Files/MetadataNotSupportedOnRemotesError.html +1 -1
- data/doc/Files/MethodNotAllowedError.html +1 -1
- data/doc/Files/MigrationInProgressError.html +1 -1
- data/doc/Files/MissingParameterError.html +1 -1
- data/doc/Files/ModelSaveErrorError.html +1 -1
- data/doc/Files/MoverAccessDeniedError.html +1 -1
- data/doc/Files/MoverPackageRequiredError.html +1 -1
- data/doc/Files/MultipleProcessingErrorsError.html +1 -1
- data/doc/Files/MultipleSortParamsNotAllowedError.html +1 -1
- data/doc/Files/MustAuthenticateWithApiKeyError.html +1 -1
- data/doc/Files/NeedAdminPermissionForInboxError.html +1 -1
- data/doc/Files/NestedNotFoundError.html +1 -1
- data/doc/Files/NoAccountForSiteError.html +1 -1
- data/doc/Files/NoValidInputParamsError.html +1 -1
- data/doc/Files/NonAdminsMustQueryByFolderOrPathError.html +1 -1
- data/doc/Files/NotAllowedToCreateBundleError.html +1 -1
- data/doc/Files/NotAuthenticatedError.html +1 -1
- data/doc/Files/NotAuthorizedError.html +1 -1
- data/doc/Files/NotEnqueuableSyncError.html +1 -1
- data/doc/Files/NotFoundError.html +1 -1
- data/doc/Files/NotImplementedError.html +1 -1
- data/doc/Files/Notification.html +1 -1
- data/doc/Files/OffsetUploadNotAllowedWithMalwareScanningError.html +1 -1
- data/doc/Files/OneTimePasswordIncorrectError.html +1 -1
- data/doc/Files/OutboundConnectionLog.html +1 -1
- data/doc/Files/PartNumberTooLargeError.html +1 -1
- data/doc/Files/Partner.html +1 -1
- data/doc/Files/PartnerChannel.html +1 -1
- data/doc/Files/PartnerChannelTemplate.html +1 -1
- data/doc/Files/PartnerConnection.html +1 -1
- data/doc/Files/PartnerSite.html +1 -1
- data/doc/Files/PartnerSiteRequest.html +1 -1
- data/doc/Files/PasswordChangeNotRequiredError.html +1 -1
- data/doc/Files/PasswordChangeRequiredError.html +1 -1
- data/doc/Files/PathCannotHaveTrailingWhitespaceError.html +1 -1
- data/doc/Files/PathTooLongError.html +1 -1
- data/doc/Files/PathUtil.html +1 -1
- data/doc/Files/Payment.html +1 -1
- data/doc/Files/PaymentLineItem.html +1 -1
- data/doc/Files/PaymentMethodErrorError.html +1 -1
- data/doc/Files/PendingWorkEvent.html +1 -1
- data/doc/Files/Permission.html +1 -1
- data/doc/Files/PlanNotFoundError.html +1 -1
- data/doc/Files/Preview.html +1 -1
- data/doc/Files/PreviewOnlyPermissionCannotDownloadError.html +1 -1
- data/doc/Files/ProcessingFailureError.html +1 -1
- data/doc/Files/PublicHostingRequestLog.html +1 -1
- data/doc/Files/PublicIpAddress.html +1 -1
- data/doc/Files/PublicKey.html +1 -1
- data/doc/Files/RateLimitedError.html +1 -1
- data/doc/Files/ReadOnlySessionError.html +1 -1
- data/doc/Files/ReadPermissionRequiredError.html +1 -1
- data/doc/Files/ReauthenticationFailedError.html +1 -1
- data/doc/Files/ReauthenticationFailedFinalError.html +1 -1
- data/doc/Files/ReauthenticationNeededActionError.html +1 -1
- data/doc/Files/ReauthenticationNeededFieldsError.html +1 -1
- data/doc/Files/ReauthenticationRateLimitedError.html +1 -1
- data/doc/Files/RecaptchaFailedError.html +1 -1
- data/doc/Files/RecipientAlreadySharedError.html +1 -1
- data/doc/Files/RemoteBandwidthSnapshot.html +1 -1
- data/doc/Files/RemoteDesktopDebugLoggingDisabledError.html +1 -1
- data/doc/Files/RemoteEntryReadOnlyError.html +1 -1
- data/doc/Files/RemoteMountBackend.html +1 -1
- data/doc/Files/RemoteServer.html +1 -1
- data/doc/Files/RemoteServerConfigurationFile.html +1 -1
- data/doc/Files/RemoteServerCredential.html +1 -1
- data/doc/Files/RemoteServerErrorError.html +1 -1
- data/doc/Files/Request.html +1 -1
- data/doc/Files/RequestBodyTooLargeError.html +1 -1
- data/doc/Files/RequestParamsContainInvalidCharacterError.html +1 -1
- data/doc/Files/RequestParamsInvalidError.html +1 -1
- data/doc/Files/RequestParamsRequiredError.html +1 -1
- data/doc/Files/ResourceBelongsToParentSiteError.html +1 -1
- data/doc/Files/ResourceLockedError.html +1 -1
- data/doc/Files/Response.html +1 -1
- data/doc/Files/Restore.html +1 -1
- data/doc/Files/RootFolderBehaviorSiteAdminRequiredError.html +1 -1
- data/doc/Files/RootFolderBehaviorSkipSiteAdminRequiredError.html +1 -1
- data/doc/Files/Schedule.html +1 -1
- data/doc/Files/ScheduledExport.html +1 -1
- data/doc/Files/ScimLog.html +1 -1
- data/doc/Files/SearchAllOnChildPathError.html +1 -1
- data/doc/Files/SearchUnavailableError.html +1 -1
- data/doc/Files/Secret.html +1 -1
- data/doc/Files/SelfManagedRequiredError.html +1 -1
- data/doc/Files/ServiceUnavailableError.html +1 -1
- data/doc/Files/Session.html +1 -1
- data/doc/Files/SettingsChange.html +1 -1
- data/doc/Files/SftpActionLog.html +1 -1
- data/doc/Files/SftpHostKey.html +1 -1
- data/doc/Files/ShareGroup.html +1 -1
- data/doc/Files/ShareGroupMember.html +1 -1
- data/doc/Files/SiemHttpDestination.html +1 -1
- data/doc/Files/SiemHttpDestinationEvent.html +1 -1
- data/doc/Files/Site.html +911 -731
- data/doc/Files/SiteAdminOrPartnerAdminPermissionRequiredError.html +1 -1
- data/doc/Files/SiteAdminOrWorkspaceAdminOrFolderAdminPermissionRequiredError.html +1 -1
- data/doc/Files/SiteAdminOrWorkspaceAdminOrPartnerAdminOrFolderAdminPermissionRequiredError.html +1 -1
- data/doc/Files/SiteAdminOrWorkspaceAdminOrPartnerAdminPermissionRequiredError.html +1 -1
- data/doc/Files/SiteAdminOrWorkspaceAdminPermissionRequiredError.html +1 -1
- data/doc/Files/SiteAdminRequiredError.html +1 -1
- data/doc/Files/SiteConfigurationError.html +1 -1
- data/doc/Files/SiteDisabledError.html +1 -1
- data/doc/Files/SiteFilesAreImmutableError.html +1 -1
- data/doc/Files/SiteNotFoundError.html +1 -1
- data/doc/Files/SiteSubdomainRedirect.html +1 -1
- data/doc/Files/SiteWasRemovedError.html +1 -1
- data/doc/Files/SizableIO.html +1 -1
- data/doc/Files/Snapshot.html +1 -1
- data/doc/Files/SsoEvent.html +1 -1
- data/doc/Files/SsoStrategy.html +1 -1
- data/doc/Files/Status.html +1 -1
- data/doc/Files/Style.html +1 -1
- data/doc/Files/SubfolderLockedError.html +1 -1
- data/doc/Files/Sync.html +1 -1
- data/doc/Files/SyncInProgressError.html +1 -1
- data/doc/Files/SyncLog.html +1 -1
- data/doc/Files/SyncRun.html +1 -1
- data/doc/Files/SyncRunLiveTransfer.html +1 -1
- data/doc/Files/SystemProfiler.html +1 -1
- data/doc/Files/TooManyConcurrentLoginsError.html +1 -1
- data/doc/Files/TooManyConcurrentRequestsError.html +1 -1
- data/doc/Files/TooManyLoginAttemptsError.html +1 -1
- data/doc/Files/TooManyRequestsError.html +1 -1
- data/doc/Files/TooManySharesError.html +1 -1
- data/doc/Files/Transfer/BufferLimitError.html +175 -0
- data/doc/Files/Transfer/ByteBudget/Reservation.html +301 -0
- data/doc/Files/Transfer/ByteBudget.html +748 -0
- data/doc/Files/Transfer/CancelledError.html +235 -0
- data/doc/Files/Transfer/Checkpoint.html +1371 -0
- data/doc/Files/Transfer/CheckpointError.html +173 -0
- data/doc/Files/Transfer/ClientTransport/ClientResponse.html +661 -0
- data/doc/Files/Transfer/ClientTransport/Reader.html +530 -0
- data/doc/Files/Transfer/ClientTransport.html +675 -0
- data/doc/Files/Transfer/Clock.html +189 -0
- data/doc/Files/Transfer/Control.html +667 -0
- data/doc/Files/Transfer/Controller/Attempt.html +465 -0
- data/doc/Files/Transfer/Controller.html +1166 -0
- data/doc/Files/Transfer/Coordinator/Timing.html +568 -0
- data/doc/Files/Transfer/Coordinator.html +534 -0
- data/doc/Files/Transfer/DownloadCoordinator/FileSink.html +976 -0
- data/doc/Files/Transfer/DownloadCoordinator/IoSink.html +1168 -0
- data/doc/Files/Transfer/DownloadCoordinator/Piece.html +875 -0
- data/doc/Files/Transfer/DownloadCoordinator.html +728 -0
- data/doc/Files/Transfer/FileSlots.html +480 -0
- data/doc/Files/Transfer/FrontendResponseError.html +235 -0
- data/doc/Files/Transfer/Holds.html +505 -0
- data/doc/Files/Transfer/HttpTransport.html +579 -0
- data/doc/Files/Transfer/Job.html +2338 -0
- data/doc/Files/Transfer/Options.html +924 -0
- data/doc/Files/Transfer/PausedError.html +319 -0
- data/doc/Files/Transfer/Policy.html +1642 -0
- data/doc/Files/Transfer/RequestPermits.html +160 -0
- data/doc/Files/Transfer/SourceChangedError.html +235 -0
- data/doc/Files/Transfer/StorageResponse.html +546 -0
- data/doc/Files/Transfer/StorageRetry.html +1098 -0
- data/doc/Files/Transfer/UploadCoordinator/Grant.html +1048 -0
- data/doc/Files/Transfer/UploadCoordinator/Part.html +1048 -0
- data/doc/Files/Transfer/UploadCoordinator/Region.html +295 -0
- data/doc/Files/Transfer/UploadCoordinator/Segments.html +299 -0
- data/doc/Files/Transfer/UploadCoordinator/Source.html +725 -0
- data/doc/Files/Transfer/UploadCoordinator/StreamSource.html +664 -0
- data/doc/Files/Transfer/UploadCoordinator.html +546 -0
- data/doc/Files/Transfer/UploadPlan.html +522 -0
- data/doc/Files/Transfer/VersionChangedError.html +235 -0
- data/doc/Files/Transfer.html +134 -0
- data/doc/Files/TrialExpiredError.html +1 -1
- data/doc/Files/TrialLockedError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationCodeAlreadySentError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationCountryBlacklistedError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationErrorError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationGeneralErrorError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationMethodUnsupportedErrorError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationRequiredError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationSetupExpiredError.html +1 -1
- data/doc/Files/TwoFactorAuthenticationUnsubscribedRecipientError.html +1 -1
- data/doc/Files/URI.html +1 -1
- data/doc/Files/UnrecognizedSortIndexError.html +1 -1
- data/doc/Files/UnsupportedCurrencyError.html +1 -1
- data/doc/Files/UnsupportedHttpResponseFormatError.html +1 -1
- data/doc/Files/UnsupportedMediaTypeError.html +1 -1
- data/doc/Files/UpdatesNotAllowedForRemotesError.html +1 -1
- data/doc/Files/UploadsUnavailableError.html +1 -1
- data/doc/Files/UsageByTopLevelDir.html +1 -1
- data/doc/Files/UsageDailySnapshot.html +1 -1
- data/doc/Files/UsageSnapshot.html +1 -1
- data/doc/Files/User.html +597 -386
- data/doc/Files/UserAdditionalEmailRecipient.html +1 -1
- data/doc/Files/UserCipherUse.html +1 -1
- data/doc/Files/UserIdInvalidError.html +1 -1
- data/doc/Files/UserIdOnUserEndpointError.html +1 -1
- data/doc/Files/UserIdWithoutSiteAdminError.html +1 -1
- data/doc/Files/UserLifecycleRule.html +1 -1
- data/doc/Files/UserNotFoundError.html +1 -1
- data/doc/Files/UserRequest.html +1 -1
- data/doc/Files/UserRequestsEnabledRequiredError.html +1 -1
- data/doc/Files/UserRequiredError.html +1 -1
- data/doc/Files/UserSecurityEvent.html +1 -1
- data/doc/Files/UserSftpClientUse.html +1 -1
- data/doc/Files/Util/LogSettings.html +1 -1
- data/doc/Files/Util.html +1 -1
- data/doc/Files/WebDavActionLog.html +1 -1
- data/doc/Files/WebhookTest.html +1 -1
- data/doc/Files/Workspace.html +1 -1
- data/doc/Files/WriteAndBundlePermissionRequiredError.html +1 -1
- data/doc/Files/WritePermissionRequiredError.html +1 -1
- data/doc/Files/ZipListEntry.html +1 -1
- data/doc/Files.html +116 -116
- data/doc/_index.html +314 -4
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +5368 -3048
- data/doc/top-level-namespace.html +1 -1
- data/docs/file.md +346 -0
- data/docs/site.md +10 -0
- data/docs/user.md +8 -0
- data/lib/files.com/api.rb +6 -1
- data/lib/files.com/api_client.rb +220 -32
- data/lib/files.com/models/file.rb +124 -17
- data/lib/files.com/models/site.rb +16 -0
- data/lib/files.com/models/user.rb +19 -0
- data/lib/files.com/transfer/budgets.rb +123 -0
- data/lib/files.com/transfer/checkpoint.rb +113 -0
- data/lib/files.com/transfer/clock.rb +14 -0
- data/lib/files.com/transfer/controller.rb +549 -0
- data/lib/files.com/transfer/download_coordinator.rb +906 -0
- data/lib/files.com/transfer/errors.rb +100 -0
- data/lib/files.com/transfer/http_transport.rb +337 -0
- data/lib/files.com/transfer/job.rb +778 -0
- data/lib/files.com/transfer/options.rb +126 -0
- data/lib/files.com/transfer/policy.rb +91 -0
- data/lib/files.com/transfer/storage_retry.rb +169 -0
- data/lib/files.com/transfer/upload_coordinator.rb +657 -0
- data/lib/files.com/transfer/upload_plan.rb +157 -0
- data/lib/files.com.rb +13 -0
- data/spec/lib/api_client_spec.rb +125 -3
- data/spec/models/file_transfer_spec.rb +53 -4
- data/spec/support/transfer_server.rb +113 -14
- data/spec/transfer/adaptive_download_spec.rb +1102 -0
- data/spec/transfer/adaptive_upload_spec.rb +1602 -0
- data/spec/transfer/concurrency_controller_spec.rb +382 -0
- data/spec/workspace_id_spec.rb +19 -14
- metadata +59 -1
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>
|
|
7
|
+
Module: Files::Transfer::UploadPlan
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.9.45
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css">
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css">
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript">
|
|
18
|
+
pathId = "Files::Transfer::UploadPlan";
|
|
19
|
+
relpath = '../../';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
|
24
|
+
|
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<div id="main_progress" aria-hidden="true"></div>
|
|
31
|
+
|
|
32
|
+
<div class="nav_wrap">
|
|
33
|
+
<iframe id="nav" src="../../class_list.html?1"></iframe>
|
|
34
|
+
<div id="resizer"></div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div id="main" tabindex="-1">
|
|
38
|
+
<div id="header">
|
|
39
|
+
<div id="menu">
|
|
40
|
+
|
|
41
|
+
<a href="../../_index.html">Index (U)</a> »
|
|
42
|
+
<span class='title'><span class='object_link'><a href="../../Files.html" title="Files (module)">Files</a></span></span> » <span class='title'><span class='object_link'><a href="../Transfer.html" title="Files::Transfer (module)">Transfer</a></span></span>
|
|
43
|
+
»
|
|
44
|
+
<span class="title">UploadPlan</span>
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div id="search">
|
|
49
|
+
|
|
50
|
+
<a class="full_list_link" id="class_list_link"
|
|
51
|
+
href="../../class_list.html">
|
|
52
|
+
|
|
53
|
+
<svg width="24" height="24">
|
|
54
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
|
55
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
|
56
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
|
57
|
+
</svg>
|
|
58
|
+
</a>
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
<div class="clear"></div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div id="content"><h1>Module: Files::Transfer::UploadPlan
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</h1>
|
|
69
|
+
<div class="box_info">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<dl>
|
|
82
|
+
<dt>Defined in:</dt>
|
|
83
|
+
<dd>lib/files.com/transfer/upload_plan.rb
|
|
84
|
+
</dd>
|
|
85
|
+
</dl>
|
|
86
|
+
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<h2>Overview</h2><div class="docstring">
|
|
90
|
+
<div class="discussion">
|
|
91
|
+
<p>How an upload sizes its parts. Nothing in the API's answers grants this by name: an upload chooses its own part size
|
|
92
|
+
only where its first answer shows every part going straight to Amazon S3 as one ordinary multipart upload (route),
|
|
93
|
+
whose signed URLs bind neither a part's length nor its bytes. There partsize and next_partsize are recommendations,
|
|
94
|
+
and each part is sent with a Content-Length of exactly its bytes. Everywhere else the API sizes the parts.
|
|
95
|
+
parallel_parts says only whether parts may be sent at once, never how large they may be.</p>
|
|
96
|
+
<p>The limits are the SDK's own for planning an upload to S3, within S3's: parts but the last of at least 5 MiB; parts
|
|
97
|
+
of at most 1 GiB, which bounds what one part holds for its retries; at most 10,000 parts, or fewer when the first
|
|
98
|
+
answer's available_parts says so; and files of at most 5 TiB. They promise nothing of Files.com's or S3's own
|
|
99
|
+
limits, and bind no other destination: a file they cannot plan is sized by the API, unless it is of at most 5 TiB
|
|
100
|
+
and buffer_bytes could not hold even the smallest part that fits it in the parts available, which the API's plan
|
|
101
|
+
would need as well. That file is refused (part_size), and its upload keeps no plan for it.</p>
|
|
102
|
+
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
<div class="tags">
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<h2>
|
|
111
|
+
Constant Summary
|
|
112
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
|
113
|
+
</h2>
|
|
114
|
+
|
|
115
|
+
<dl class="constants">
|
|
116
|
+
|
|
117
|
+
<dt id="MIB-constant" class="">MIB =
|
|
118
|
+
|
|
119
|
+
</dt>
|
|
120
|
+
<dd><pre class="code"><span class='int'>1024</span> <span class='op'>*</span> <span class='int'>1024</span></pre></dd>
|
|
121
|
+
|
|
122
|
+
<dt id="MIN_PART_BYTES-constant" class="">MIN_PART_BYTES =
|
|
123
|
+
|
|
124
|
+
</dt>
|
|
125
|
+
<dd><pre class="code"><span class='int'>5</span> <span class='op'>*</span> <span class='const'><span class='object_link'><a href="#MIB-constant" title="Files::Transfer::UploadPlan::MIB (constant)">MIB</a></span></span></pre></dd>
|
|
126
|
+
|
|
127
|
+
<dt id="MAX_PART_BYTES-constant" class="">MAX_PART_BYTES =
|
|
128
|
+
|
|
129
|
+
</dt>
|
|
130
|
+
<dd><pre class="code"><span class='int'>1024</span> <span class='op'>*</span> <span class='const'><span class='object_link'><a href="#MIB-constant" title="Files::Transfer::UploadPlan::MIB (constant)">MIB</a></span></span></pre></dd>
|
|
131
|
+
|
|
132
|
+
<dt id="MAX_PARTS-constant" class="">MAX_PARTS =
|
|
133
|
+
|
|
134
|
+
</dt>
|
|
135
|
+
<dd><pre class="code"><span class='int'>10_000</span></pre></dd>
|
|
136
|
+
|
|
137
|
+
<dt id="MAX_FILE_BYTES-constant" class="">MAX_FILE_BYTES =
|
|
138
|
+
|
|
139
|
+
</dt>
|
|
140
|
+
<dd><pre class="code"><span class='int'>5</span> <span class='op'>*</span> <span class='int'>1024</span> <span class='op'>*</span> <span class='int'>1024</span> <span class='op'>*</span> <span class='const'><span class='object_link'><a href="#MIB-constant" title="Files::Transfer::UploadPlan::MIB (constant)">MIB</a></span></span></pre></dd>
|
|
141
|
+
|
|
142
|
+
<dt id="PREFERRED_PART_BYTES-constant" class="">PREFERRED_PART_BYTES =
|
|
143
|
+
<div class="docstring">
|
|
144
|
+
<div class="discussion">
|
|
145
|
+
<p>The size every part but the last has, unless the file needs larger parts to fit the parts available, or the
|
|
146
|
+
caller's buffer_bytes smaller ones.</p>
|
|
147
|
+
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
<div class="tags">
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
</div>
|
|
154
|
+
</dt>
|
|
155
|
+
<dd><pre class="code"><span class='int'>8</span> <span class='op'>*</span> <span class='const'><span class='object_link'><a href="#MIB-constant" title="Files::Transfer::UploadPlan::MIB (constant)">MIB</a></span></span></pre></dd>
|
|
156
|
+
|
|
157
|
+
<dt id="QUERY_PARAMETERS-constant" class="">QUERY_PARAMETERS =
|
|
158
|
+
<div class="docstring">
|
|
159
|
+
<div class="discussion">
|
|
160
|
+
<p>The query parameters a presigned UploadPart may have: those naming the part and its upload, and SigV4's own.</p>
|
|
161
|
+
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="tags">
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
</div>
|
|
168
|
+
</dt>
|
|
169
|
+
<dd><pre class="code"><span class='qwords_beg'>%w[</span><span class='tstring_content'>partNumber</span><span class='words_sep'> </span><span class='tstring_content'>uploadId</span><span class='words_sep'> </span><span class='tstring_content'>X-Amz-Algorithm</span><span class='words_sep'> </span><span class='tstring_content'>X-Amz-Credential</span><span class='words_sep'> </span><span class='tstring_content'>X-Amz-Date</span><span class='words_sep'> </span><span class='tstring_content'>X-Amz-Expires</span><span class='words_sep'> </span><span class='tstring_content'>X-Amz-SignedHeaders</span><span class='words_sep'> </span><span class='tstring_content'>X-Amz-Signature</span><span class='words_sep'>
|
|
170
|
+
</span><span class='tstring_content'>X-Amz-Security-Token</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_freeze'>freeze</span></pre></dd>
|
|
171
|
+
|
|
172
|
+
</dl>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<h2>
|
|
183
|
+
Class Method Summary
|
|
184
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
|
185
|
+
</h2>
|
|
186
|
+
|
|
187
|
+
<ul class="summary">
|
|
188
|
+
|
|
189
|
+
<li class="public ">
|
|
190
|
+
<span class="summary_signature">
|
|
191
|
+
|
|
192
|
+
<a href="#general_purpose_endpoint%3F-class_method" title="general_purpose_endpoint? (class method)">.<strong>general_purpose_endpoint?</strong>(host) ⇒ Boolean </a>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
</span>
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
<span class="summary_desc"><div class='inline'><p>s3, s3.<region>, s3-<region> or s3.dualstack.<region> under amazonaws.com or amazonaws.com.cn, alone, with the bucket in the path, or after a bucket of one or more labels.</p></div></span>
|
|
207
|
+
|
|
208
|
+
</li>
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
<li class="public ">
|
|
212
|
+
<span class="summary_signature">
|
|
213
|
+
|
|
214
|
+
<a href="#part_size-class_method" title="part_size (class method)">.<strong>part_size</strong>(total, available_parts, most) ⇒ Object </a>
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
</span>
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<span class="summary_desc"><div class='inline'><p>The size of every part but the last of an upload of total bytes: PREFERRED_PART_BYTES, or the larger size, in whole MiB, that fits total in the parts available, but no larger than most, the largest part buffer_bytes holds as the upload reserves it (Float::INFINITY when parts stream), and never smaller than the least that fits: the parts available, and 5 MiB unless the whole file is one part.</p></div></span>
|
|
229
|
+
|
|
230
|
+
</li>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<li class="public ">
|
|
234
|
+
<span class="summary_signature">
|
|
235
|
+
|
|
236
|
+
<a href="#route-class_method" title="route (class method)">.<strong>route</strong>(upload, number) ⇒ Object </a>
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
</span>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
<span class="summary_desc"><div class='inline'><p>The ordinary multipart upload straight to Amazon S3 that upload, the API's answer for part number, is for: a digest of its endpoint, object and upload ID, which is all a checkpoint keeps of it, or nil when the answer is not exactly that.</p></div></span>
|
|
251
|
+
|
|
252
|
+
</li>
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
</ul>
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<div id="class_method_details" class="method_details_list">
|
|
262
|
+
<h2>Class Method Details</h2>
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
<div class="method_details first">
|
|
266
|
+
<h3 class="signature first" id="general_purpose_endpoint?-class_method">
|
|
267
|
+
|
|
268
|
+
.<strong>general_purpose_endpoint?</strong>(host) ⇒ <tt>Boolean</tt>
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
</h3><div class="docstring">
|
|
275
|
+
<div class="discussion">
|
|
276
|
+
<p>s3, s3.<region>, s3-<region> or s3.dualstack.<region> under amazonaws.com or amazonaws.com.cn, alone, with the
|
|
277
|
+
bucket in the path, or after a bucket of one or more labels. Not S3's accelerate, FIPS, website, access point,
|
|
278
|
+
Object Lambda, Outposts, Express or control endpoints, which this SDK does not size parts for.</p>
|
|
279
|
+
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
<div class="tags">
|
|
283
|
+
|
|
284
|
+
<p class="tag_title">Returns:</p>
|
|
285
|
+
<ul class="return">
|
|
286
|
+
|
|
287
|
+
<li>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
</li>
|
|
295
|
+
|
|
296
|
+
</ul>
|
|
297
|
+
|
|
298
|
+
</div><table class="source_code">
|
|
299
|
+
<tr>
|
|
300
|
+
<td>
|
|
301
|
+
<pre class="lines">
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
103
|
|
305
|
+
104
|
|
306
|
+
105
|
|
307
|
+
106
|
|
308
|
+
107
|
|
309
|
+
108
|
|
310
|
+
109
|
|
311
|
+
110
|
|
312
|
+
111
|
|
313
|
+
112
|
|
314
|
+
113
|
|
315
|
+
114
|
|
316
|
+
115
|
|
317
|
+
116
|
|
318
|
+
117
|
|
319
|
+
118</pre>
|
|
320
|
+
</td>
|
|
321
|
+
<td>
|
|
322
|
+
<pre class="code"><span class="info file"># File 'lib/files.com/transfer/upload_plan.rb', line 103</span>
|
|
323
|
+
|
|
324
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_general_purpose_endpoint?'>general_purpose_endpoint?</span><span class='lparen'>(</span><span class='id identifier rubyid_host'>host</span><span class='rparen'>)</span>
|
|
325
|
+
<span class='id identifier rubyid_host'>host</span> <span class='op'>=</span> <span class='id identifier rubyid_host'>host</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span>
|
|
326
|
+
<span class='id identifier rubyid_within'>within</span> <span class='op'>=</span> <span class='qwords_beg'>%w[</span><span class='tstring_content'>.amazonaws.com</span><span class='words_sep'> </span><span class='tstring_content'>.amazonaws.com.cn</span><span class='tstring_end'>]</span></span><span class='period'>.</span><span class='id identifier rubyid_filter_map'>filter_map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_suffix'>suffix</span><span class='op'>|</span> <span class='id identifier rubyid_host'>host</span><span class='period'>.</span><span class='id identifier rubyid_delete_suffix'>delete_suffix</span><span class='lparen'>(</span><span class='id identifier rubyid_suffix'>suffix</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_host'>host</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='id identifier rubyid_suffix'>suffix</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
|
327
|
+
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_within'>within</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_within'>within</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
|
328
|
+
|
|
329
|
+
<span class='id identifier rubyid_labels'>labels</span> <span class='op'>=</span> <span class='id identifier rubyid_within'>within</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span>
|
|
330
|
+
<span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='id identifier rubyid_labels'>labels</span><span class='period'>.</span><span class='id identifier rubyid_rindex'>rindex</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>s3</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
331
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_endpoint'>endpoint</span>
|
|
332
|
+
<span class='id identifier rubyid_after'>after</span> <span class='op'>=</span> <span class='id identifier rubyid_labels'>labels</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>+</span> <span class='int'>1</span><span class='rparen'>)</span><span class='op'>..</span><span class='rbracket'>]</span>
|
|
333
|
+
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_after'>after</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_after'>after</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>&&</span> <span class='id identifier rubyid_region?'>region?</span><span class='lparen'>(</span><span class='id identifier rubyid_after'>after</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='id identifier rubyid_after'>after</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>2</span> <span class='op'>&&</span> <span class='id identifier rubyid_after'>after</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>dualstack</span><span class='tstring_end'>"</span></span> <span class='op'>&&</span> <span class='id identifier rubyid_region?'>region?</span><span class='lparen'>(</span><span class='id identifier rubyid_after'>after</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
334
|
+
<span class='kw'>else</span>
|
|
335
|
+
<span class='id identifier rubyid_endpoint'>endpoint</span> <span class='op'>=</span> <span class='id identifier rubyid_labels'>labels</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>-</span> <span class='int'>1</span>
|
|
336
|
+
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_labels'>labels</span><span class='lbracket'>[</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>s3-</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_region?'>region?</span><span class='lparen'>(</span><span class='id identifier rubyid_labels'>labels</span><span class='lbracket'>[</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete_prefix'>delete_prefix</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>s3-</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
337
|
+
<span class='kw'>end</span>
|
|
338
|
+
<span class='id identifier rubyid_labels'>labels</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='id identifier rubyid_endpoint'>endpoint</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_none?'>none?</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:empty?</span><span class='rparen'>)</span>
|
|
339
|
+
<span class='kw'>end</span></pre>
|
|
340
|
+
</td>
|
|
341
|
+
</tr>
|
|
342
|
+
</table>
|
|
343
|
+
</div>
|
|
344
|
+
|
|
345
|
+
<div class="method_details ">
|
|
346
|
+
<h3 class="signature " id="part_size-class_method">
|
|
347
|
+
|
|
348
|
+
.<strong>part_size</strong>(total, available_parts, most) ⇒ <tt>Object</tt>
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
</h3><div class="docstring">
|
|
355
|
+
<div class="discussion">
|
|
356
|
+
<p>The size of every part but the last of an upload of total bytes: PREFERRED_PART_BYTES, or the larger size, in
|
|
357
|
+
whole MiB, that fits total in the parts available, but no larger than most, the largest part buffer_bytes holds
|
|
358
|
+
as the upload reserves it (Float::INFINITY when parts stream), and never smaller than the least that fits: the
|
|
359
|
+
parts available, and 5 MiB unless the whole file is one part. A size above most is a plan buffer_bytes cannot
|
|
360
|
+
hold, refused before anything is read or sent. Nil, for the API to size the parts, when total is larger than
|
|
361
|
+
MAX_FILE_BYTES, or needs parts larger than MAX_PART_BYTES in the parts available: those are only the SDK's
|
|
362
|
+
limits. A total needing parts that large and larger than most too raises BufferLimitError instead, never giving
|
|
363
|
+
a size: the API's parts, in the parts available, could not be smaller, so no plan could send it within
|
|
364
|
+
buffer_bytes, and no size it gives is ever larger than MAX_PART_BYTES.</p>
|
|
365
|
+
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
<div class="tags">
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
</div><table class="source_code">
|
|
372
|
+
<tr>
|
|
373
|
+
<td>
|
|
374
|
+
<pre class="lines">
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
42
|
|
378
|
+
43
|
|
379
|
+
44
|
|
380
|
+
45
|
|
381
|
+
46
|
|
382
|
+
47
|
|
383
|
+
48
|
|
384
|
+
49
|
|
385
|
+
50
|
|
386
|
+
51
|
|
387
|
+
52
|
|
388
|
+
53
|
|
389
|
+
54
|
|
390
|
+
55
|
|
391
|
+
56
|
|
392
|
+
57</pre>
|
|
393
|
+
</td>
|
|
394
|
+
<td>
|
|
395
|
+
<pre class="code"><span class="info file"># File 'lib/files.com/transfer/upload_plan.rb', line 42</span>
|
|
396
|
+
|
|
397
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_part_size'>part_size</span><span class='lparen'>(</span><span class='id identifier rubyid_total'>total</span><span class='comma'>,</span> <span class='id identifier rubyid_available_parts'>available_parts</span><span class='comma'>,</span> <span class='id identifier rubyid_most'>most</span><span class='rparen'>)</span>
|
|
398
|
+
<span class='id identifier rubyid_parts'>parts</span> <span class='op'>=</span> <span class='id identifier rubyid_available_parts'>available_parts</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_available_parts'>available_parts</span><span class='period'>.</span><span class='id identifier rubyid_positive?'>positive?</span> <span class='op'>?</span> <span class='lbracket'>[</span> <span class='id identifier rubyid_available_parts'>available_parts</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#MAX_PARTS-constant" title="Files::Transfer::UploadPlan::MAX_PARTS (constant)">MAX_PARTS</a></span></span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="#MAX_PARTS-constant" title="Files::Transfer::UploadPlan::MAX_PARTS (constant)">MAX_PARTS</a></span></span>
|
|
399
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_total'>total</span> <span class='op'>></span> <span class='const'><span class='object_link'><a href="#MAX_FILE_BYTES-constant" title="Files::Transfer::UploadPlan::MAX_FILE_BYTES (constant)">MAX_FILE_BYTES</a></span></span>
|
|
400
|
+
|
|
401
|
+
<span class='id identifier rubyid_needed'>needed</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_total'>total</span> <span class='op'>+</span> <span class='id identifier rubyid_parts'>parts</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>/</span> <span class='id identifier rubyid_parts'>parts</span>
|
|
402
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_needed'>needed</span> <span class='op'>></span> <span class='const'><span class='object_link'><a href="#MAX_PART_BYTES-constant" title="Files::Transfer::UploadPlan::MAX_PART_BYTES (constant)">MAX_PART_BYTES</a></span></span>
|
|
403
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_needed'>needed</span> <span class='op'><=</span> <span class='id identifier rubyid_most'>most</span>
|
|
404
|
+
|
|
405
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="BufferLimitError.html" title="Files::Transfer::BufferLimitError (class)">BufferLimitError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_total'>total</span><span class='embexpr_end'>}</span><span class='tstring_content'>-byte upload needs parts of at least </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_needed'>needed</span><span class='embexpr_end'>}</span><span class='tstring_content'> bytes in its </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_parts'>parts</span><span class='embexpr_end'>}</span><span class='tstring_content'> available parts, </span><span class='tstring_end'>"</span></span> \
|
|
406
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>more than the </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_most'>most</span><span class='embexpr_end'>}</span><span class='tstring_content'> bytes buffer_bytes can hold for a part</span><span class='tstring_end'>"</span></span>
|
|
407
|
+
<span class='kw'>end</span>
|
|
408
|
+
|
|
409
|
+
<span class='id identifier rubyid_preferred'>preferred</span> <span class='op'>=</span> <span class='lbracket'>[</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='lbracket'>[</span> <span class='const'><span class='object_link'><a href="#PREFERRED_PART_BYTES-constant" title="Files::Transfer::UploadPlan::PREFERRED_PART_BYTES (constant)">PREFERRED_PART_BYTES</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_needed'>needed</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span> <span class='op'>+</span> <span class='const'><span class='object_link'><a href="#MIB-constant" title="Files::Transfer::UploadPlan::MIB (constant)">MIB</a></span></span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>/</span> <span class='const'><span class='object_link'><a href="#MIB-constant" title="Files::Transfer::UploadPlan::MIB (constant)">MIB</a></span></span><span class='rparen'>)</span> <span class='op'>*</span> <span class='const'><span class='object_link'><a href="#MIB-constant" title="Files::Transfer::UploadPlan::MIB (constant)">MIB</a></span></span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#MAX_PART_BYTES-constant" title="Files::Transfer::UploadPlan::MAX_PART_BYTES (constant)">MAX_PART_BYTES</a></span></span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span>
|
|
410
|
+
<span class='id identifier rubyid_least'>least</span> <span class='op'>=</span> <span class='lbracket'>[</span> <span class='id identifier rubyid_needed'>needed</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="#MIN_PART_BYTES-constant" title="Files::Transfer::UploadPlan::MIN_PART_BYTES (constant)">MIN_PART_BYTES</a></span></span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span>
|
|
411
|
+
<span class='lbracket'>[</span> <span class='lbracket'>[</span> <span class='id identifier rubyid_preferred'>preferred</span><span class='comma'>,</span> <span class='id identifier rubyid_most'>most</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span><span class='comma'>,</span> <span class='id identifier rubyid_total'>total</span> <span class='op'><=</span> <span class='id identifier rubyid_least'>least</span> <span class='op'>?</span> <span class='id identifier rubyid_total'>total</span> <span class='op'>:</span> <span class='id identifier rubyid_least'>least</span> <span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span>
|
|
412
|
+
<span class='kw'>end</span></pre>
|
|
413
|
+
</td>
|
|
414
|
+
</tr>
|
|
415
|
+
</table>
|
|
416
|
+
</div>
|
|
417
|
+
|
|
418
|
+
<div class="method_details ">
|
|
419
|
+
<h3 class="signature " id="route-class_method">
|
|
420
|
+
|
|
421
|
+
.<strong>route</strong>(upload, number) ⇒ <tt>Object</tt>
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
</h3><div class="docstring">
|
|
428
|
+
<div class="discussion">
|
|
429
|
+
<p>The ordinary multipart upload straight to Amazon S3 that upload, the API's answer for part number, is for: a
|
|
430
|
+
digest of its endpoint, object and upload ID, which is all a checkpoint keeps of it, or nil when the answer is not
|
|
431
|
+
exactly that. Every condition is read from the answer as the API gave it, and all must hold:</p>
|
|
432
|
+
<pre class="code ruby"><code class="ruby">action put/write: an ordinary write, not an append or restart
|
|
433
|
+
http_method PUT
|
|
434
|
+
part_number number
|
|
435
|
+
upload_uri https on the default port, without user information or fragment, to an S3
|
|
436
|
+
general-purpose endpoint (general_purpose_endpoint?), and a SigV4 presigned UploadPart:
|
|
437
|
+
partNumber naming number; uploadId; X-Amz-Algorithm AWS4-HMAC-SHA256; X-Amz-Credential
|
|
438
|
+
scoped to s3; X-Amz-SignedHeaders host alone, so that neither the length nor the bytes
|
|
439
|
+
are signed; X-Amz-Signature; each once, and no parameter but QUERY_PARAMETERS, so none
|
|
440
|
+
binding a checksum, digest or length
|
|
441
|
+
headers, parameters none
|
|
442
|
+
send exactly the part's size as its Content-Length and its bytes as the body
|
|
443
|
+
direct_connection_info none
|
|
444
|
+
</code></pre>
|
|
445
|
+
<p>Anything else, such as a host that only resembles S3's, a custom or S3-compatible endpoint, a Files.com or agent
|
|
446
|
+
URL, or a parallel flag on its own, is not this route. The URL is only read: the part goes to it exactly as given.</p>
|
|
447
|
+
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
<div class="tags">
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
</div><table class="source_code">
|
|
454
|
+
<tr>
|
|
455
|
+
<td>
|
|
456
|
+
<pre class="lines">
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
78
|
|
460
|
+
79
|
|
461
|
+
80
|
|
462
|
+
81
|
|
463
|
+
82
|
|
464
|
+
83
|
|
465
|
+
84
|
|
466
|
+
85
|
|
467
|
+
86
|
|
468
|
+
87
|
|
469
|
+
88
|
|
470
|
+
89
|
|
471
|
+
90
|
|
472
|
+
91
|
|
473
|
+
92
|
|
474
|
+
93
|
|
475
|
+
94
|
|
476
|
+
95
|
|
477
|
+
96
|
|
478
|
+
97
|
|
479
|
+
98</pre>
|
|
480
|
+
</td>
|
|
481
|
+
<td>
|
|
482
|
+
<pre class="code"><span class="info file"># File 'lib/files.com/transfer/upload_plan.rb', line 78</span>
|
|
483
|
+
|
|
484
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_route'>route</span><span class='lparen'>(</span><span class='id identifier rubyid_upload'>upload</span><span class='comma'>,</span> <span class='id identifier rubyid_number'>number</span><span class='rparen'>)</span>
|
|
485
|
+
<span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='id identifier rubyid_upload'>upload</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:attributes</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_upload'>upload</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_upload'>upload</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
|
486
|
+
<span class='id identifier rubyid_url'>url</span> <span class='op'>=</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:upload_uri</span><span class='rbracket'>]</span>
|
|
487
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:action</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>put/write</span><span class='tstring_end'>"</span></span> <span class='op'>&&</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:http_method</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>PUT</span><span class='tstring_end'>"</span></span> <span class='op'>&&</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:part_number</span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_number'>number</span> <span class='op'>&&</span>
|
|
488
|
+
<span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:direct_connection_info</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_none?'>none?</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:headers</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_none?'>none?</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:parameters</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&&</span>
|
|
489
|
+
<span class='id identifier rubyid_ordinary_send?'>ordinary_send?</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='symbol'>:send</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>?</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>#</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
490
|
+
|
|
491
|
+
<span class='id identifier rubyid_uri'>uri</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>URI</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
|
|
492
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_scheme'>scheme</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_casecmp?'>casecmp?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>https</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span> <span class='op'>==</span> <span class='int'>443</span> <span class='op'>&&</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_userinfo'>userinfo</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span> <span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>></span> <span class='int'>1</span> <span class='op'>&&</span>
|
|
493
|
+
<span class='id identifier rubyid_general_purpose_endpoint?'>general_purpose_endpoint?</span><span class='lparen'>(</span><span class='id identifier rubyid_uri'>uri</span><span class='period'>.</span><span class='id identifier rubyid_host'>host</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
|
494
|
+
|
|
495
|
+
<span class='id identifier rubyid_resource'>resource</span><span class='comma'>,</span> <span class='id identifier rubyid_query'>query</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>?</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='int'>2</span><span class='rparen'>)</span>
|
|
496
|
+
<span class='id identifier rubyid_values'>values</span> <span class='op'>=</span> <span class='id identifier rubyid_signed_query'>signed_query</span><span class='lparen'>(</span><span class='id identifier rubyid_query'>query</span><span class='rparen'>)</span>
|
|
497
|
+
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_values'>values</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>uploadId</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>&&</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>partNumber</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='id identifier rubyid_number'>number</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>&&</span>
|
|
498
|
+
<span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>X-Amz-Algorithm</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>AWS4-HMAC-SHA256</span><span class='tstring_end'>"</span></span> <span class='op'>&&</span> <span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>X-Amz-Credential</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_end_with?'>end_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/s3/aws4_request</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='op'>&&</span>
|
|
499
|
+
<span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>X-Amz-SignedHeaders</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>host</span><span class='tstring_end'>"</span></span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>X-Amz-Signature</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
|
500
|
+
|
|
501
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>sha256:</span><span class='embexpr_beg'>#{</span><span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA256</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_resource'>resource</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_values'>values</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>uploadId</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
502
|
+
<span class='kw'>rescue</span> <span class='op'>::</span><span class='const'>URI</span><span class='op'>::</span><span class='const'>InvalidURIError</span>
|
|
503
|
+
<span class='kw'>nil</span>
|
|
504
|
+
<span class='kw'>end</span></pre>
|
|
505
|
+
</td>
|
|
506
|
+
</tr>
|
|
507
|
+
</table>
|
|
508
|
+
</div>
|
|
509
|
+
|
|
510
|
+
</div>
|
|
511
|
+
|
|
512
|
+
</div>
|
|
513
|
+
|
|
514
|
+
<div id="footer">
|
|
515
|
+
Generated on Tue Nov 3 21:11:44 2026 by
|
|
516
|
+
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
517
|
+
0.9.45 (ruby-4.0.9).
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
</div>
|
|
521
|
+
</body>
|
|
522
|
+
</html>
|